Hi all
I wrote a little wrapper around ansible-playbook to help make playbooks executable. Thought you’ll be interested.
More details here: http://blog.bigpanda.io/ansible-exec-ansible-playbook-wrapper-for-executing-playbooks
Hi all
I wrote a little wrapper around ansible-playbook to help make playbooks executable. Thought you’ll be interested.
More details here: http://blog.bigpanda.io/ansible-exec-ansible-playbook-wrapper-for-executing-playbooks
As an interesting sidenote, you can also do this by putting a shebang line in your YAML and making your playbook executable. (This trick supplied a while ago by Brian Coca)
Many of the common options, such as defaults for “-i”, can be set in an ~/.ansible.cfg, or /etc/ansible/ansible.cfg.
I do see what you have there with variable syntax around “-e” and other options not defined being fed to -e, though the likely downside of this is typos become variables, which is why we avoid this.
–inventoyr=foo.txt, etc, could accidentally define a variable.
Still, a neat trick. Thanks for sharing!