Files
tower-tests/python-test.yml
2022-03-11 03:21:02 -05:00

40 lines
590 B
YAML

---
- name: install and check python
hosts: all
gather_facts: yes
become: no
vars:
install_pkgs: yes
tasks:
- name: Install python packages
package :
name : "{{ item }}"
state : present
with_items:
- python2
- python3
when:
- install_pkgs|bool
- name: Debug python interpreter
debug:
var: ansible_python_interpreter
- name: Check Python version
debug:
var: ansible_python_version
- name: Check executable
debug:
var: ansible_python.executable
...