Uncategorized

Ansible Python interpreter – Module not found Error


I have a main.yml file written for an Ansible playbook where I am calling a python script . My ansible version is 2.9 and the default python script version is 3.6.8 .. I have imported some modules like NetmikoAuthentication and NetmikoTimeout and SSH one but it is acceptable only when I should have a python version >=3.8 and < 4.0 … I have also upgraded my python to 3.8.9 which is shown in my /usr/local/bin/python3.8 … for my python script , I want to specifically call it using 3.8 but it is by far accepting the default python version 3.6 . How to resolve this issue ?? Can anyone help me out . I have even used vars section where I have used
ansible_python_interpreter: “/usr/local/bin/python3.8 “ as my path as well . Still it is not accepting . Any responses will be highly appreciated .

I have tried using vars and I have added

  • vars:
    ansible_python_interpreter: “/usr/local/bin/python3.8”

But it is still reflecting the default python version 3.6 only … I am expecting that this python script what I am using should reflect for version 3.8 and not for 3.6 .



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *