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
|
||||
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
|
||||
# Options are 'present' and 'latest'
|
||||
repo_server_package_state: "latest"
|
||||
@ -47,4 +51,4 @@ repo_git_cache_dirname: openstackgit
|
||||
repo_git_cache_dir: "{{ repo_service_home_folder }}/repo/{{ repo_git_cache_dirname }}"
|
||||
|
||||
# Set the log directory
|
||||
repo_service_log_dir: /var/log/apt-cacher-ng
|
||||
repo_service_log_dir: /var/log/apt-cacher-ng
|
||||
|
@ -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
|
||||
rpm_key:
|
||||
key: "http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7"
|
||||
key: "{{ repo_centos_epel_key }}"
|
||||
state: present
|
||||
when:
|
||||
- ansible_pkg_mgr in ['yum', 'dnf']
|
||||
@ -27,7 +27,7 @@
|
||||
- name: Install the EPEL repository
|
||||
yum_repository:
|
||||
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'
|
||||
gpgcheck: yes
|
||||
enabled: yes
|
||||
|
Loading…
x
Reference in New Issue
Block a user