lxc-config/hooks/ansible

11 lines
227 B
Plaintext
Raw Normal View History

2014-08-18 08:29:43 +00:00
#!/bin/bash
if [ -z "$LXC_NAME" ]; then
echo "LXC_NAME not set" 2>&1
exit 1
fi
lxc-start -n "$LXC_NAME" -d
ansible-playbook -i /etc/ansible/inventory /etc/ansible/site.yml --limit "$LXC_NAME" 1>&2
lxc-stop -n "$LXC_NAME"