bootstrap_python/tasks/main.yaml
2022-04-27 10:37:13 +02:00

31 lines
783 B
YAML

---
- name: raw | Install python3 on archlinux
ansible.builtin.raw: |
test -e /bin/pacman &&\
pacman -S python3 --asexplicit --noconfirm ||\
echo "pacman not available on this host" &&\
exit 0;
become: true
register: pacman
changed_when: |
('reinstalling python' not in pacman.stdout) and
('pacman not available on this host' not in pacman.stdout)
tags:
- raw
- install
- name: raw | Install python3 on RHEL
ansible.builtin.raw: |
test -e /usr/bin/dnf &&\
dnf install -y python3 ||\
echo "dnf not available on this host" &&\
exit 0;
become: true
register: dnf
changed_when: |
('is already installed' not in dnf.stdout) and
('dnf not available on this host' not in dnf.stdout)
tags:
- raw
- install