Skip to content
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 for non-standard python locations #54479

Open
wants to merge 1 commit into
base: devel
from

Conversation

Projects
None yet
4 participants
@evitalis
Copy link

commented Mar 27, 2019

SUMMARY

Add an example inventory entry for using alternative paths for the python interpreter. This is common on *BSD type systems, but can apply to source installations of Python.

I was not 100% on the wording but figured it would be a start and is a non-impacting change to rest of the product.

ISSUE TYPE
  • Docs Pull Request
COMPONENT NAME

Documentation and examples

ADDITIONAL INFORMATION

On *BSD systems Python is installed to /usr/local/bin rather than /usr/bin on Linux systems. While the documentation includes it is a bit hidden and this updates an example to make it more obvious. The same information could be used on Linux systems with Python compiled from source where applicable.

@acozine

This comment has been minimized.

Copy link
Contributor

commented Mar 27, 2019

Thanks @evitalis for contributing! Starting in 2.8, we're updating the way Ansible searches for Python on target systems - take a look at https://docs.ansible.com/ansible/devel/porting_guides/porting_guide_2.8.html#python-interpreter-discovery for details.

@evitalis

This comment has been minimized.

Copy link
Author

commented Mar 27, 2019

@acozine Thank you for the reply but I am a little confused. Do you mean ansible 2.8 will by default also check /usr/local/bin or does the ansible_python_interpreter need set to the new value? If the latter would there still be value in this PR but instead of being /usr/local/bin it show the auto option ?

@acozine

This comment has been minimized.

Copy link
Contributor

commented Mar 28, 2019

@evitalis - Ansible 2.8 will by default check to see if it "knows" where Python is installed on the target system. The details of how it does that, and in which order, are complex, so I won't write them out here. But on 2.8 you should not need to set ansible_python_interpreter to run against BSD systems.

You can test this now by running the devel branch from GitHub instead of using the latest version (which is currently 2.7) - see https://docs.ansible.com/ansible/devel/installation_guide/intro_installation.html#running-from-source for information on running from source (aka installing a branch from GitHub).

@evitalis

This comment has been minimized.

Copy link
Author

commented Apr 1, 2019

Thanks. When ansible 2.8 releases I can test and follow up. Can this PR remain open until that time in case it still ends up being applicable?

@acozine

This comment has been minimized.

Copy link
Contributor

commented Apr 5, 2019

@evitalis okay, I'll leave the PR open for now.

We cut 2.8 alpha1 yesterday, and welcome testing/feedback on it.

@ansibot ansibot added the stale_ci label Apr 5, 2019

@bcoca bcoca removed the needs_triage label Apr 9, 2019

@evitalis

This comment has been minimized.

Copy link
Author

commented Apr 24, 2019

@acozine I will test this soon and follow up with you. I didn't get notified of the comment so I apologize for the delay in response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.