Trying to use ansible python module location as ansible python interpeter

18 views
Skip to first unread message

Adar Shaked

unread,
Dec 1, 2020, 3:35:49 AM12/1/20
to Ansible Project
Hi all,
i am creating venv at runtime and installs ansible inside like:
/tmp/tmp123/bin/ansible-playbook
ansible version shows:
 ansible python module location =/tmp/tmp123/lib/python3.6/site-packages/ansible
executable location = =/tmp/tmp123/bin/ansible-playbook

im running a playbook locally(means localhost) and i want the ansible python interpeter will be the one in the venv that i installed ansible inside. again , i know the loaction of the venv on runtime so i cant use `ansible_python_interpeter`. maybe there are environment variables that represent the ansible-playbook executable path that i can use in my playbook?or the python path of ansible executable uses ?

David Shrewsbury

unread,
Dec 1, 2020, 7:04:42 AM12/1/20
to ansible...@googlegroups.com
ansible_python_interpreter: "{{ ansible_playbook_python }}"
> --
> 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 ansible-proje...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/3b9f5254-1d99-4e45-afc2-483cb277d1c7n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages