Discover CentOS mirror in nodepool jobs
This patch discovers the CentOS mirror in the nodepool jobs and sets a variable to be used by the pip_install role later. This will allow the pip_install role to adjust the yum repo configuration to use the best CentOS mirror. Change-Id: I382b8ef06f5c99de7fa1ce5895bd229867c12535
This commit is contained in:
parent
72b42af30a
commit
afb957d0bc
|
@ -59,6 +59,28 @@
|
|||
- ansible_pkg_mgr == 'apt'
|
||||
- nodepool.stat.exists | bool
|
||||
|
||||
- name: Discover the CentOS mirror URL when in nodepool
|
||||
shell: |
|
||||
source /etc/ci/mirror_info.sh
|
||||
echo "${NODEPOOL_CENTOS_MIRROR}"
|
||||
args:
|
||||
executable: /bin/bash
|
||||
register: centos_mirror_url
|
||||
delegate_to: localhost
|
||||
when:
|
||||
- ansible_pkg_mgr in ['yum', 'dnf']
|
||||
- nodepool.stat.exists | bool
|
||||
tags:
|
||||
- skip_ansible_lint
|
||||
|
||||
# NOTE(mhayden): This mirror URL already has the '/centos' URI added.
|
||||
- name: Set a fact to override the CentOS mirror URL when in nodepool
|
||||
set_fact:
|
||||
pip_install_centos_mirror_url: "{{ centos_mirror_url.stdout }}"
|
||||
when:
|
||||
- ansible_pkg_mgr in ['yum', 'dnf']
|
||||
- nodepool.stat.exists | bool
|
||||
|
||||
# NOTE(mhayden): GPG checking for local package installs is normally disabled
|
||||
# by default in CentOS, but the ansible-hardening role enables GPG
|
||||
# checking for local packages. The RDO repository package isn't signed, but the
|
||||
|
|
Loading…
Reference in New Issue