--- - name: combine epel_repo config set_fact: epel_repo: "{{ _epel_repo|combine(epel_repo, recursive=true) }}" - name: run optional versionscheck ansible.builtin.include_tasks: versioncheck.yml when: submodules_versioncheck|bool - name: import EPEL Repo GPG Key block: - name: import epel gpg from file rpm_key: key: "{{ epel_repo.gpg_key_path }}" state: present fingerprint: "{{ epel_repo.fingerprint[ansible_distribution_major_version] }}" rescue: - name: import epel gpg key from url rpm_key: key: "{{ epel_repo.gpg_key_url }}" 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 yum: name: "{{ epel_repo.url }}" state: present 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" when: ansible_os_family != 'RedHat' or ansible_distribution == 'Fedorra'