ansible 2.3.1.0 python 2.7.14
I'm just wondering the best approach to handling a multi-OS environment where python interpreters are located at different paths: Linux: /usr/bin/python OpenBSD, FreeBSD /usr/local/bin/python macOS w/Homebrew /usr/local/bin/python2 ...and ansible_python_interpreter needs to be overridden on a large part of the environment. In this deployment I strongly want to use the approach like in [1] to group hosts by OS using ansible_distribution fact, so I want to avoid static declarations in inventory files and would like this to be able to be specified in something like group_vars/Linux, group_vars/OpenBSD, etc. leveraging ansible_distribution groupings. Is there a way to achieve this? Or is it a chicken and egg problem that requires inventory specifications because the ansible_distribution cannot be known prior to invoking Python? [1] https://github.com/ansible/ansible-examples/blob/master/language_features/group_by.yml -- Darren Spruell [email protected] -- 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/CAKVSOJVQV3t-zQjabdf%2BzGuRZih_M6Wbh5GZv3EWgb5o7WanQw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
