From 237f666ade538e4195664de4eff1fa8a2d9454ce Mon Sep 17 00:00:00 2001 From: L3D Date: Mon, 2 Mar 2020 21:16:03 +0100 Subject: [PATCH] make sure it will war you if you use a not supported OS --- tasks/main.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tasks/main.yml b/tasks/main.yml index 325df61..3bd75af 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -20,6 +20,9 @@ state: present fingerprint: "{{ epel_repo['fingerprint'][ ansible_distribution_major_version ] }}" become: true + when: + - ansible_os_family == 'RedHat' + - ansible_distribution != 'Fedorra' - name: Install EPEL repo become: true @@ -29,3 +32,10 @@ register: result until: result is succeeded retries: 3 + when: + - ansible_os_family == 'RedHat' + - ansible_distribution != 'Fedorra' + +- name: info for fedora and non RHEL + pause: + prompt: "Please notice this role is designed to work only with RHEL/CentOS 6,7 and 8"