You could use update-alternatives --config python
:
[root@rocky8 ~]# update-alternatives --config python
There are 2 programs which provide 'python'.
Selection Command
-----------------------------------------------
* 1 /usr/libexec/no-python
+ 2 /usr/bin/python3
as you can see my python is linked to python3. This ansible_python_interpreter
shouldn’t be required at this point. As far as I am aware ansible_python_interpreter
is required to be configured in the playbook, but you can configure it globally in ansible.cfg
as follows in this way instead:
[defaults]
interpreter_python = "/usr/bin/python3"
As for the second problem man ansible-pull
:
-i, --inventory, --inventory-file
specify inventory host path or comma separated host list. --inventory-file is deprecated. This argument
may be specified multiple times.
So:
ansible-pull -i host -U url .....
if you want more hosts, comma separate them.