Centos EPEL options default to global variable

Repository variables lxc_centos_epel_mirror and lxc_centos_epel_key will
default to centos_epel_mirror and centos_epel_key

Change-Id: Icf84a0a55654fa890947bae5b608870eddad7324
This commit is contained in:
Kourosh Vivan 2019-10-17 16:48:16 +02:00 committed by Dmitriy Rabotyagov (noonedeadpunk)
parent 62c3a2cbe1
commit 921c98f67b
3 changed files with 8 additions and 11 deletions

View File

@ -91,12 +91,6 @@ 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 }}"
@ -250,6 +244,10 @@ lxc_cache_download_template_options: >-
# Locales to populate in the LXC base cache
lxc_cache_locales: "{{ _lxc_cache_locales | default(['en_US.UTF-8']) }}"
# Centos EPEL repository options
lxc_centos_epel_mirror: "{{ centos_epel_mirror | default('http://download.fedoraproject.org/pub/epel') }}"
lxc_centos_epel_key: "{{ centos_epel_key | default('http://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7') }}"
# LXC must be installed from a COPR repository on CentOS 7 since the version
# provided in EPEL is much too old (1.x).
lxc_centos_package_baseurl: https://copr-be.cloud.fedoraproject.org/results/thm/lxc2.0/epel-7-x86_64/

View File

@ -1,6 +1,5 @@
---
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.
``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_key`` for gpg key location.

View File

@ -36,7 +36,7 @@
- name: Install EPEL gpg keys
rpm_key:
key: "{{ lxc_centos_epel_gpg_key | default ('http://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7') }}"
key: "{{ lxc_centos_epel_key }}"
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: "{{ (lxc_centos_epel_mirror | default ('http://download.fedoraproject.org/pub/epel')) ~ '/' ~ ansible_distribution_major_version ~ '/' ~ ansible_architecture }}"
baseurl: "{{ lxc_centos_epel_mirror ~ '/' ~ ansible_distribution_major_version ~ '/' ~ ansible_architecture }}"
description: 'Extra Packages for Enterprise Linux 7 - $basearch'
gpgcheck: yes
enabled: yes