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

Do a better job identifying Python locations when connection is local #44173

Closed
mcandre opened this issue Aug 15, 2018 · 9 comments
Closed

Do a better job identifying Python locations when connection is local #44173

mcandre opened this issue Aug 15, 2018 · 9 comments
Labels
affects_2.7 This issue/PR affects Ansible v2.7 feature This issue/PR relates to a feature request. inventory Inventory category module This issue/PR relates to a module. notification Notification category support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team.

Comments

@mcandre
Copy link

mcandre commented Aug 15, 2018

SUMMARY

The Ansible BSD documentation currently requires users to explicitly configure the Python interpreter path:

https://docs.ansible.com/ansible/2.5/user_guide/intro_bsd.html

This is annoying, especially when a perfectly good Python interpreter is already available in $PATH. Ansible could do a better job integrating with BSD and other *nix systems, such:

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

ansible-playbook

SUGGESTED REMEDIATION STEPS
  • Drop the hardcoded absolute path assumption of /usr/bin/python and simply using python instead. This would allow Ansible to succeed for many more operating system environments by default.
  • Have the default Ansible inventory configuration specify appropriate values for the ansible_python_interpreter, such as /usr/local/bin/python for FreeBSD. Have user inventories extend this default inventory configuration.
  • Detect when ansible-playbook is running on BSD machines, and apply the correct hardcoded absolute path, such as /usr/local/bin/python in FreeBSD. Playbooks are already capable of switching on OS metadata. The base Ansible CLI tools should be able to do this as well.

Any or all of these changes would make for a better out-of-the-box experience with Ansible with BSD machines.

@ansibot
Copy link
Contributor

ansibot commented Aug 15, 2018

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot ansibot added affects_2.7 This issue/PR affects Ansible v2.7 feature This issue/PR relates to a feature request. inventory Inventory category needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Aug 15, 2018
@sivel
Copy link
Member

sivel commented Aug 15, 2018

We are looking into this. It will likely not be default behavior, and will require a toggle within the playbook, and potentially the config to enable searching for the interpreter.

A little bit of work has gone into this recently in #42783

@sivel sivel removed the needs_triage Needs a first human triage before being processed. label Aug 15, 2018
@bcoca
Copy link
Member

bcoca commented Aug 15, 2018

FYI, the official FreeBSD port changes the default to /usr/local/bin/python, so it depends on your installation method.

@zhushida775
Copy link

ansible

@ansibot
Copy link
Contributor

ansibot commented Feb 17, 2019

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Feb 17, 2019

@ansibot ansibot added cloud cloudstack module This issue/PR relates to a module. notification Notification category support:community This issue/PR relates to code supported by the Ansible community. labels Feb 17, 2019
@resmo
Copy link
Contributor

resmo commented Feb 17, 2019

!component -lib/ansible/modules/cloud/cloudstack/cs_configuration.py

@ansibot
Copy link
Contributor

ansibot commented Feb 17, 2019

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@mkrizek
Copy link
Contributor

mkrizek commented Mar 21, 2019

Fixed in #50163

@mkrizek mkrizek closed this as completed Mar 21, 2019
@ansible ansible locked and limited conversation to collaborators Jul 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.7 This issue/PR affects Ansible v2.7 feature This issue/PR relates to a feature request. inventory Inventory category module This issue/PR relates to a module. notification Notification category support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

No branches or pull requests

7 participants