Set a fact for handling yum's fastestmirror plugin

In the past, we've messed around with enabling or disabling the
yum's fastestmirror plugin. It is helpful if you are running outside
the OpenStack CI system since it will find the fastest mirrors from
a publicly available mirror list.

However, in the CI system, we override the mirror list with a hard-
coded mirror in the `baseurl` line. There's no need to load or use
the fastestmirror plugin in these situations and gathering a list
of mirrors just slows things down.

This patch sets a fact that other roles can check and disable the
fastestmirror plugin when needed.

Change-Id: I8b2a1db084ab47962dbef8c6b037836f44b4ed46
This commit is contained in:
Major Hayden 2018-02-13 13:52:50 -06:00
parent f9887050e6
commit 6337538173
No known key found for this signature in database
GPG Key ID: 737051E0C1011FB1
1 changed files with 6 additions and 0 deletions

View File

@ -110,3 +110,9 @@
- { src: '/etc/pip.conf', dest: '/etc/pip.conf' }
when:
- nodepool.stat.exists | bool
- name: Set a fact to disable yum's fastestmirror support when in nodepool
set_fact:
openstack_hosts_enable_yum_fastestmirror: no
when:
- nodepool.stat.exists | bool