I updated a recent playbook module that says I need to use at least Python version 3.8. I run this playbook on our AWX controller. When I run the cmd module and do a "which python3" I get back version 3.6 in /var/lib/awx/venv/ansible/bin/python3. I tried doing a pre_task to install python3.9 using the yum module, and I see in the output that it gets installed.
I thought I could use the "var: ansible_python_interpreter: path but I need to find out where new versions of python get installed. Do you know where python gets installed within the AWX controller when running a playbook to install it?
---
- name: Test commands
hosts: localhost
connection: local
gather_facts: false
pre_tasks:
- name: install Python
ansible.builtin.yum:
name: python3.9
state: present
become: yes
delegate_to: localhost
- name: Configure Avi Controller
hosts: localhost
connection: local
collections:
- cyberark.pas
- vmware.alb
vars:
ansible_python_interpreter: /var/lib/awx/venv/ansible/bin/python3.9
tasks:
When I run this I get "/var/lib/awx/venv/ansible/bin/python3.9 file or directory does not exist"