46 lines
1.1 KiB
YAML
46 lines
1.1 KiB
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
|
|
|
|
- name: raw | install python3 on Debian
|
|
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
|