Install Ansible itself on Ubuntu target host(s), in a python virtual environment.
To update an ansible installation, specify ansible_inst_state=forcereinstall
ansible_inst_ver: "2.9"
ansible_inst_path: "~/venvs/ansible-{{ansible_inst_ver}}"
ansible_venv_python: "python3.5"
ansible_inst_state: "present"
- hosts: all
become: yes
roles:
- { role: ansible-role-ansible, ansible_inst_ver: ">=2.9,<2.10", ansible_inst_path="~/venvs/ansible-2.9" }
- { role: ansible-role-ansible, ansible_inst_ver: ">=2.8,<2.9", ansible_inst_path="~/venvs/ansible-2.8", ansible_inst_state: "forcereinstall" }