From d636fa002b3b80cc921cb033fbcb37c4e292c484 Mon Sep 17 00:00:00 2001 From: Wallun Date: Sun, 28 Nov 2021 13:24:16 +0100 Subject: [PATCH] feat(tasks): install python3 on rhel --- tasks/main.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tasks/main.yaml b/tasks/main.yaml index 425e2da..f46f5e0 100644 --- a/tasks/main.yaml +++ b/tasks/main.yaml @@ -13,3 +13,18 @@ tags: - raw - install + +- name: raw | Install python3 on RHEL + raw: | + test -e /usr/bin/dnf &&\ + dnf install -yq 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