Hi there. On a few old/legacy systems I have installed python 2.6 in a nondefault location whereas the "default" (path) is an older version such as 2.4. In some cases I have legacy apps that may need the old version and I don't want to affect their environment.
Setting ansible_python_interpreter to the python26 binary works well, however I also have a bunch of facts.d scripts which use python, unfortunately these pickup the 2.4 version. I was just wondering if there is a built in solution to handle this? The current solution I came up with was to use the environment.PATH setting in the ansible playbook to add a path which contains the 26 python binary. This works with a caveat, however facts appear to be gathered before the PATH is set, so i need to regather facts after I set the environment. The other solution I was thinking of is just maintaining a symbolic link to the correct python version which then I would hard code in the shebang for the python facts scripts. Just wondering if anyone has a better solution or perhaps this might be a good enhancement request. Perhaps the ansible setup module could detect that the fact script is python and call it with the ansible_python_interpreter if it's set? -- 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/c4586a39-4923-48aa-a53a-7184899eaab8%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
