bootstrap_python/tasks/main.yaml

46 lines
1.1 KiB
YAML
Raw Normal View History

---
- name: Raw | Install python3 on Archlinux
2022-04-27 10:37:13 +02:00
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
2021-11-28 13:24:16 +01:00
- name: Raw | Install python3 on RHEL
2022-04-27 10:37:13 +02:00
ansible.builtin.raw: |
2021-11-28 13:24:16 +01:00
test -e /usr/bin/dnf &&\
dnf install -y python3 ||\
2021-11-28 13:24:16 +01:00
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
2022-05-25 22:33:53 +02:00
- name: Raw | install python3 on Debian
2022-05-25 22:33:53 +02:00
ansible.builtin.raw: |
test -e /usr/bin/apt &&\
apt install python3 ||\
echo "apt is not available on this host" &&\
exit 0;
become: true
register: apt
changed_when: |
('python3 is already' not in apt.stdout) and
('apt is not available on this host' not in apt.stdout)
tags:
- raw
- install