diff --git a/ansible/playbooks/lab.yaml b/ansible/playbooks/lab.yaml index 3c71891..2f68af9 100644 --- a/ansible/playbooks/lab.yaml +++ b/ansible/playbooks/lab.yaml @@ -5,4 +5,5 @@ become: true roles: + - python - sshd \ No newline at end of file diff --git a/ansible/roles/python/tasks/main.yml b/ansible/roles/python/tasks/main.yml new file mode 100644 index 0000000..4b33936 --- /dev/null +++ b/ansible/roles/python/tasks/main.yml @@ -0,0 +1,11 @@ +--- +- name: check python + raw: test -e /usr/bin/python3 + changed_when: false + failed_when: false + register: check_python + +- name: install python + become: true + raw: pacman -Sy python3 --noconfirm + when: check_python.rc != 0 \ No newline at end of file