R
R
romankulish52019-01-14 21:08:19
Ansible
romankulish5, 2019-01-14 21:08:19

How to make python3 the default interpreter in ansible?

Good day.
I tried a bunch of different ways, but python3 does not want to work as the default interpreter in ansible, please tell me how to do this?
I tried to add the line ansible_python_interpreter=/usr/bin/python3 in hosts, I also wrote it into variables, 0 effect.
I installed ansible through pip3, I thought it would be added by default, like this: pip3 install ansible.
Maybe I'm doing something wrong? I didn’t find it, maybe it’s somehow added to ansible.conf?
Thanks in advance for your help.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Puma Thailand, 2019-01-15
@opium

If you need it on the host, then just change the python symlink to python3
If on the nodes, then the
ansible_python_interpreter=/usr/bin/python3 command
in the all section in the inventory file will help you

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question