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

ANSIBLE_PYTHON_INTERPRETER env variable not used? #650

Closed
sscherfke opened this issue Sep 27, 2019 · 3 comments
Closed

ANSIBLE_PYTHON_INTERPRETER env variable not used? #650

sscherfke opened this issue Sep 27, 2019 · 3 comments

Comments

@sscherfke
Copy link

When I run ansible without mitogen, I can set the remote Python interpreter via the envirnoment variable ANSIBLE_PYTHON_INTERPRETER:

ANSIBLE_PYTHON_INTERPRETER=/usr/bin/python3 ansible-playbook deploy.yaml -vvv

The output confirms that, e.g., python3.6 is than used instead of python(2).

When I do the same with mitogen enabled, it will still use python(2). When I use ansible_python_interpreter from within the inventory file, it works, however.

@frankruegamer
Copy link

frankruegamer commented Dec 18, 2019

I can confirm this issue.

Also setting interpreter_python = /usr/bin/python3 inside ansible.cfg will still result in python 2 being used.

This will also result in different behavior compared to vanilla Ansible, for example when using the pip module.

It seems to be related to the interpreter discovery of Ansible 2.8.

These users seem to be having the same problem:
#673
#676

@bradh352
Copy link

duplicate of #597 ?

@s1113950
Copy link
Collaborator

s1113950 commented Mar 22, 2020

#658 should fix this, and as #597 is closed I'm closing this as well. Please reopen if your issue persists!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants