Reputation: 51
I use ansible programming api to manage passwords(update periodically based on pre-determined password) of lots of hosts,but hosts' python interpreter path is different,may be in /"usr/bin" or "/usr/local/bin",how can i tell ansible to try another when one path of them is not right?
Upvotes: 1
Views: 2549
Reputation: 68289
You can't define multiple interpreters with ansible_python_interpreter
, but I guess this should do the trick:
ansible_python_interpreter="/usr/bin/env python"
env
is commonly used in scripts as shebang to detect actual interpreter's path.
Upvotes: 8