Add Centos GPG key custom url
When using a custom repo with centos_epel_mirror, you maybe need to change the gpg key url because offline env You can use this variable: lxc_centos_epel_gpg_key Change-Id: Ia30f20df6971a9a44a69e5cc22020831a95a1489
This commit is contained in:
parent
f70417ed24
commit
62c3a2cbe1
@ -91,6 +91,12 @@ lxc_container_cache_path: "/var/cache/lxc/download"
|
||||
# copy_from_host: [] # List of files to copy into the container
|
||||
lxc_cache_map: "{{ _lxc_cache_map }}"
|
||||
|
||||
|
||||
## If you want to use a custom epel repo
|
||||
# lxc_centos_epel_mirror: http://mirror.myconpany/epel/
|
||||
# lxc_centos_epel_gpg_key: http://mirror.myconpany/epel-key/RPM-GPG-KEY-EPEL-7
|
||||
|
||||
|
||||
# When using a base container to snapshot from for the overlayfs or LVM
|
||||
# copy-on-write backing stored, the base container can be set.
|
||||
lxc_container_base_name: "{{ lxc_cache_map.distro }}-{{ lxc_cache_map.release }}-{{ lxc_cache_map.arch }}"
|
||||
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
features:
|
||||
- You can set a private repository for epel, you must use
|
||||
``lxc_centos_epel_mirror`` for the repo URL and if you need to get the GPG
|
||||
key from intranet or a mirror use ``lxc_centos_epel_gpg_key`` for gpg key
|
||||
location.
|
@ -36,7 +36,7 @@
|
||||
|
||||
- name: Install EPEL gpg keys
|
||||
rpm_key:
|
||||
key: "http://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7"
|
||||
key: "{{ lxc_centos_epel_gpg_key | default ('http://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7') }}"
|
||||
state: present
|
||||
register: _add_yum_keys
|
||||
until: _add_yum_keys is success
|
||||
@ -46,7 +46,7 @@
|
||||
- name: Install the EPEL repository
|
||||
yum_repository:
|
||||
name: epel-lxc_hosts
|
||||
baseurl: "{{ (centos_epel_mirror | default ('http://download.fedoraproject.org/pub/epel')) ~ '/' ~ ansible_distribution_major_version ~ '/' ~ ansible_architecture }}"
|
||||
baseurl: "{{ (lxc_centos_epel_mirror | default ('http://download.fedoraproject.org/pub/epel')) ~ '/' ~ 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