Page 1 of 1

Ansible for Juniper on Ubuntu -- Interpreter error

Posted: Mon Jan 11, 2021 11:28 pm
by okeyf16@yahoo.com
Hi Im having trouble setting up my ansible playbook to run for juniper on ubuntu 20.04
At this point Im stuck at getting python3 to work as the interpreter, any working solutions will be most appreciated.
Ive checked google, github, Ansible & Ubuntu documentation neither solved my problem ( or maybe I just couldnt find the right solution ). See Error below

fatal: [Ikeja]: FAILED! => {"changed": false, "module_stderr": "/bin/sh: 1: /usr/bin/python3.8.5: not found\n", "module_stdout": "", "msg": "The module failed to execute correctly, you probably need to set the interpreter.\nSee stdout/stderr for the exact error", "rc": 127}

Re: Ansible for Juniper on Ubuntu -- Interpreter error

Posted: Tue Jan 12, 2021 3:41 pm
by okeyf16@yahoo.com
Ive edited the Interpreter in multiple locations fro both python3 & 3.8 without luck.. See below
---Hostfile--
[junos]
Ikeja ansible_python_interpreter=/usr/bin/python3
Uyo

[junos:vars]
ansible_python_interpreter=/usr/bin/python3

---Ansible cofig file ( /etc/ansible/ansible.cfg )------
[defaults]
ansible_python_interpreter=/usr/bin/python3

----- .bashrc file ------
alias python="/usr/bin/python3"

root@treadstone:~# ls /usr/bin/python*
/usr/bin/python3 <-------- This is blue all others below are green
/usr/bin/python3.8
/usr/bin/python3-futurize
/usr/bin/python3-pasteurize
/usr/bin/python-argcomplete-check-easy-install-script3
/usr/bin/python-argcomplete-tcsh3