mirror of
http://git.hogwarts.fr/hogwarts-ansible/bootstrap_python.git
synced 2023-12-14 02:53:03 +01:00
31 lines
783 B
YAML
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
|