2020-02-20 16:13:15 +01:00
|
|
|
---
|
2020-02-26 14:37:22 +01:00
|
|
|
- name: combine epel_repo config
|
|
|
|
set_fact:
|
|
|
|
epel_repo: "{{ _epel_repo|combine(epel_repo, recursive=True) }}"
|
|
|
|
|
2020-02-20 16:13:15 +01:00
|
|
|
- include_tasks: versioncheck.yml
|
|
|
|
when: submodules_versioncheck|bool
|
|
|
|
|
|
|
|
- name: import EPEL Repo GPG Key
|
2020-02-26 14:37:22 +01:00
|
|
|
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:
|
2020-02-27 16:42:08 +01:00
|
|
|
- name: import epel gpg key from url
|
2020-02-26 14:37:22 +01:00
|
|
|
rpm_key:
|
|
|
|
key: "{{ epel_repo.gpg_key_url }}"
|
|
|
|
state: present
|
|
|
|
fingerprint: "{{ epel_repo['fingerprint'][ ansible_distribution_major_version ] }}"
|
2020-02-20 16:13:15 +01:00
|
|
|
become: true
|
|
|
|
|
|
|
|
- name: Install EPEL repo
|
|
|
|
become: true
|
|
|
|
yum:
|
2020-02-26 14:37:22 +01:00
|
|
|
name: "{{ epel_repo.url }}"
|
2020-02-20 16:13:15 +01:00
|
|
|
state: present
|
2020-02-20 16:24:54 +01:00
|
|
|
register: result
|
2020-02-20 16:13:15 +01:00
|
|
|
until: result is succeeded
|
|
|
|
retries: 3
|