-
Notifications
You must be signed in to change notification settings - Fork 365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add example /usr/bin/env python as Python interpreter #280
Add example /usr/bin/env python as Python interpreter #280
Conversation
Thanks for your Ansible docs contribution! We talk about Ansible documentation on matrix at #docs:ansible.im and on libera IRC at #ansible-docs if you ever want to join us and chat about the docs! We meet there on Tuesdays (see the Ansible calendar) and welcome additions to our weekly agenda items - scroll down to find the upcoming agenda and add a comment to put something new on that agenda. |
I''m not sure python_3_support.rst is the right place for this note. Interpreter discovery has its own doc. This point isn't specifically related to python3. |
I looked around a bit before adding an example here as it also contains other example usage of Another candidate would be https://docs.ansible.com/ansible/latest/reference_appendices/interpreter_discovery.html but it clearly references the Python 3 support page for What would you think is a better page for this? I can update MR accordingly |
@PierreBeucher Thanks for the docs contribution. I added a comment with some minor wording suggestions. As far as where this should go in the docs, my 2c is that it might fit ok after the last sentence in |
133881b
to
3bd4c8d
Compare
Sometime users will want to use the first Python interpreter available on PATH and/or can't know in advance the Python interpreter absolute path on managed hosts (such as NixOS where path might change in Nix store). Method found from this comment: ansible/ansible#6345 (comment)
Thanks, I updated with your proposed change. How about a |
3bd4c8d
to
e1a4658
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed a commit to add a sphinx anchor for the Python 3 Support section. LGTM now. Thanks for the docs contribution @PierreBeucher
I was looking for a way to use Python interpreter from an environment variable or directly from
PATH
rather than specifying absolute path asansible_python_interpreter
. For instance, I'm creating NixOS instance in Cloud and path to Python is hard to know in advance, I'd rather use the one fromPATH
.Found out via ansible/ansible#6345 (comment) one could use
And though it would be worth adding an example in doc :)