Add Centos GPG key custom url
When using a custom repo with repo_centos_epel_mirror, you maybe need to change the gpg key url because offline env You can use this variable: repo_centos_epel_key Change-Id: I9bb305d866f3d65653b95a25a5b9f5ecde5af0b0
This commit is contained in:
parent
3c02d26e25
commit
aecff065f1
@ -23,6 +23,10 @@ repo_nginx_threads: "{{ [[ansible_processor_vcpus|default(2) // 2, 1] | max, rep
|
|||||||
## APT Cache Options
|
## APT Cache Options
|
||||||
cache_timeout: 600
|
cache_timeout: 600
|
||||||
|
|
||||||
|
## Centos EPEL repository options
|
||||||
|
repo_centos_epel_mirror: "{{ centos_epel_mirror | default('http://download.fedoraproject.org/pub/epel') }}"
|
||||||
|
repo_centos_epel_key: "{{ centos_epel_key | default('http://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7') }}"
|
||||||
|
|
||||||
# Set the package install state for distribution and pip packages
|
# Set the package install state for distribution and pip packages
|
||||||
# Options are 'present' and 'latest'
|
# Options are 'present' and 'latest'
|
||||||
repo_server_package_state: "latest"
|
repo_server_package_state: "latest"
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- You can set a private repository for epel, you must use
|
||||||
|
``repo_centos_epel_mirror`` for the repo URL and if you need to get the GPG
|
||||||
|
key from intranet or a mirror use ``repo_centos_epel_key`` for gpg key
|
||||||
|
location.
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
- name: Install EPEL gpg keys
|
- name: Install EPEL gpg keys
|
||||||
rpm_key:
|
rpm_key:
|
||||||
key: "http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7"
|
key: "{{ repo_centos_epel_key }}"
|
||||||
state: present
|
state: present
|
||||||
when:
|
when:
|
||||||
- ansible_pkg_mgr in ['yum', 'dnf']
|
- ansible_pkg_mgr in ['yum', 'dnf']
|
||||||
@ -27,7 +27,7 @@
|
|||||||
- name: Install the EPEL repository
|
- name: Install the EPEL repository
|
||||||
yum_repository:
|
yum_repository:
|
||||||
name: epel-repo_server
|
name: epel-repo_server
|
||||||
baseurl: "{{ (centos_epel_mirror | default ('http://download.fedoraproject.org/pub/epel')) ~ '/' ~ ansible_distribution_major_version ~ '/' ~ ansible_architecture }}"
|
baseurl: "{{ repo_centos_epel_mirror ~ '/' ~ ansible_distribution_major_version ~ '/' ~ ansible_architecture }}"
|
||||||
description: 'Extra Packages for Enterprise Linux 7 - $basearch'
|
description: 'Extra Packages for Enterprise Linux 7 - $basearch'
|
||||||
gpgcheck: yes
|
gpgcheck: yes
|
||||||
enabled: yes
|
enabled: yes
|
||||||
|
Loading…
x
Reference in New Issue
Block a user