Joined December 2012
·

Nick Groenen

(web)developer / sysadmin at Travelbird
·
The Netherlands
·
·
·

Posted to executable playbooks over 1 year ago

This will work fine (and is a clever trick) when you don't need to pass any arguments to ansible-playbook, but is very likely to fail when you pass along extra arguments.

This is because on many platforms, the shebang line is very limited and accepts only a program (which is already taken up by /usr/bin/env in this case) and takes everything that follows as a single argument to that executable.

For more info on this, see http://stackoverflow.com/a/4304187

Achievements
119 Karma
0 Total ProTip Views