From 1495735a937416f41bb08cad16561c60d1e026a3 Mon Sep 17 00:00:00 2001 From: Logan V Date: Wed, 22 May 2019 07:33:23 -0500 Subject: [PATCH] Add a note explaning why we disable yum repos Change-Id: I0e156a793e77fcfd9f2f32bfb25dcabfc239d8a9 --- test-ansible-functional.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test-ansible-functional.sh b/test-ansible-functional.sh index 0ebb42ec..59e8d166 100755 --- a/test-ansible-functional.sh +++ b/test-ansible-functional.sh @@ -77,6 +77,16 @@ function execute_ansible_playbook { # NOTE(mhayden): CentOS images in the gate have several slow mirrors enabled # by default. This step ensures that only the base and updates # repositories are enabled. +# +# NOTE(logan): Due to the way Ansible's yum module works, we should leave all +# except these two repos globally disabled. See the link below for more info: +# https://github.com/ansible/ansible/issues/26995#issuecomment-392288700 +# +# Rather than enabling repos globally, we can use the yum repository module to +# selectively pull in packages from other repos (ie. extras, EPEL, RDO, etc.) +# on an as-needed basis in the roles where they are required using includepkgs. +# See the example here: +# https://opendev.org/openstack/openstack-ansible-lxc_hosts/src/commit/a6cae27fa3e6d03b48ba34468df4af90c77f4880/tasks/lxc_install_yum.yml#L46-L58 if [[ -x /usr/bin/yum-config-manager ]] && [[ -e /etc/centos-release ]]; then sudo yum-config-manager --disable \* > /dev/null sudo yum-config-manager --enable base > /dev/null