Joined May 2011
·

Jesse Hallett

Software Engineer
·
St. George's, Grenada
·
·
·

Posted to executable playbooks over 1 year ago

I like this idea. But my understanding is that setting options with the ansible-playbook command with this method will work in OS X, but not in Linux, for the reason zoni describes. In Linux you can only supply a program name and one option.

You can run a playbook on Linux this way with no options specified:

#!/usr/bin/env ansible-playbook

Or if you are willing to assume the location of ansible-playbook, you can supply one option, as long as it does not contain spaces:

#!/usr/bin/ansible-playbook --inventory=../hosts

Notice the use of the long-form switch, which does not have a space between --inventory and ../hosts

Achievements
149 Karma
0 Total ProTip Views