Add a note explaning why we disable yum repos
Change-Id: I0e156a793e77fcfd9f2f32bfb25dcabfc239d8a9
This commit is contained in:
parent
2620841ac8
commit
1495735a93
@ -77,6 +77,16 @@ function execute_ansible_playbook {
|
|||||||
# NOTE(mhayden): CentOS images in the gate have several slow mirrors enabled
|
# NOTE(mhayden): CentOS images in the gate have several slow mirrors enabled
|
||||||
# by default. This step ensures that only the base and updates
|
# by default. This step ensures that only the base and updates
|
||||||
# repositories are enabled.
|
# 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
|
if [[ -x /usr/bin/yum-config-manager ]] && [[ -e /etc/centos-release ]]; then
|
||||||
sudo yum-config-manager --disable \* > /dev/null
|
sudo yum-config-manager --disable \* > /dev/null
|
||||||
sudo yum-config-manager --enable base > /dev/null
|
sudo yum-config-manager --enable base > /dev/null
|
||||||
|
Loading…
Reference in New Issue
Block a user