mirror of
https://github.com/roles-ansible/ansible_role_epel.git
synced 2024-08-16 14:49:49 +02:00
change all variable names
change variables, add fingerprint check and add fallback if local keys do not exist
This commit is contained in:
parent
12536bd788
commit
225bd0dc68
4 changed files with 36 additions and 8 deletions
|
@ -10,6 +10,7 @@ missing:
|
||||||
- os detection (RHEL)
|
- os detection (RHEL)
|
||||||
- github-actions
|
- github-actions
|
||||||
- docs
|
- docs
|
||||||
|
- vars
|
||||||
|
|
||||||
working:
|
working:
|
||||||
- epel install on centos 7
|
- epel install on centos 7
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
---
|
---
|
||||||
submodules_versioncheck: true
|
submodules_versioncheck: false
|
||||||
# epel repo
|
# epel repo
|
||||||
epel_repo_url: "https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm"
|
epel_repo:
|
||||||
epel_repo_gpg_key_url: "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-{{ ansible_distribution_major_version }}"
|
url: "https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm"
|
||||||
|
gpg_key_url: "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-{{ ansible_distribution_major_version }}"
|
||||||
|
gpg_key_path: "/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-{{ ansible_distribution_major_version }}"
|
||||||
|
fingerprint:
|
||||||
|
'6': "8C3B E96A F230 9184 DA5C 0DAE 3B49 DF2A 0608 B895"
|
||||||
|
'7': "91E9 7D7C 4A5E 96F1 7F3E 888F 6A2F AEA2 352C 64E5"
|
||||||
|
'8': "94E2 79EB 8D8F 25B2 1810 ADF1 21EA 45AB 2F86 D6A1"
|
||||||
|
|
|
@ -1,18 +1,30 @@
|
||||||
---
|
---
|
||||||
|
- name: combine epel_repo config
|
||||||
|
set_fact:
|
||||||
|
epel_repo: "{{ _epel_repo|combine(epel_repo, recursive=True) }}"
|
||||||
|
|
||||||
- include_tasks: versioncheck.yml
|
- include_tasks: versioncheck.yml
|
||||||
when: submodules_versioncheck|bool
|
when: submodules_versioncheck|bool
|
||||||
|
|
||||||
- name: import EPEL Repo GPG Key
|
- name: import EPEL Repo GPG Key
|
||||||
become: true
|
block:
|
||||||
|
- name: import epel gpg from file
|
||||||
rpm_key:
|
rpm_key:
|
||||||
key: "{{ epel_repo_gpg_key_url }}"
|
key: "{{ epel_repo.gpg_key_path }}"
|
||||||
state: present
|
state: present
|
||||||
validate_certs: true
|
fingerprint: "{{ epel_repo.fingerprint[ansible_distribution_major_version] }}"
|
||||||
|
rescue:
|
||||||
|
- name: import epel gpgp from url
|
||||||
|
rpm_key:
|
||||||
|
key: "{{ epel_repo.gpg_key_url }}"
|
||||||
|
state: present
|
||||||
|
fingerprint: "{{ epel_repo['fingerprint'][ ansible_distribution_major_version ] }}"
|
||||||
|
become: true
|
||||||
|
|
||||||
- name: Install EPEL repo
|
- name: Install EPEL repo
|
||||||
become: true
|
become: true
|
||||||
yum:
|
yum:
|
||||||
name: "{{ epel_repo_url }}"
|
name: "{{ epel_repo.url }}"
|
||||||
state: present
|
state: present
|
||||||
register: result
|
register: result
|
||||||
until: result is succeeded
|
until: result is succeeded
|
||||||
|
|
|
@ -1,3 +1,12 @@
|
||||||
---
|
---
|
||||||
playbook_version_number: 1025 # should be over ninethousand
|
playbook_version_number: 1025 # should be over ninethousand
|
||||||
playbook_version_path: 'role-epel_roles-ansible_github.com.version'
|
playbook_version_path: 'role-epel_roles-ansible_github.com.version'
|
||||||
|
# epel repo
|
||||||
|
_epel_repo:
|
||||||
|
url: "https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm"
|
||||||
|
gpg_key_url: "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-{{ ansible_distribution_major_version }}"
|
||||||
|
gpg_key_path: "/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-{{ ansible_distribution_major_version }}"
|
||||||
|
fingerprint:
|
||||||
|
'6': "8C3B E96A F230 9184 DA5C 0DAE 3B49 DF2A 0608 B895"
|
||||||
|
'7': "91E9 7D7C 4A5E 96F1 7F3E 888F 6A2F AEA2 352C 64E5"
|
||||||
|
'8': "94E2 79EB 8D8F 25B2 1810 ADF1 21EA 45AB 2F86 D6A1"
|
||||||
|
|
Loading…
Reference in a new issue