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)

# /usr/bin/env ansible-playbook

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!






On Fri, Aug 29, 2014 at 2:58 PM, Hagai Kariti <[email protected]> wrote:

> 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
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/e710114e-4a52-40aa-b8ce-918bc00c1dc6%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/e710114e-4a52-40aa-b8ce-918bc00c1dc6%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgzdSmeja%3DO3Sa%2ByDf3adnK5a7JGpREQAauCLXK-pYKTng%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to