#!/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"