Skip to content

Commit d471c0c

Browse files
rlandyfrenzyfriday
authored andcommitted
Add conditional for CentOS 10 - nodepool mirror
1 parent 0f46d18 commit d471c0c

File tree

2 files changed

+22
-8
lines changed

2 files changed

+22
-8
lines changed

roles/build_containers/templates/build_containers.sh.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ openstack tcib container image build \
4949
{% endfor %}
5050
{% endif %}
5151
--tcib-extra tcib_release={{ ansible_distribution_major_version }} \
52-
--tcib-extra tcib_python_version={{ (ansible_distribution_major_version is version('9', '<')) | ternary ('3.6', '3.9') }} \
52+
--tcib-extra tcib_python_version={{ (ansible_distribution_major_version is version('10', '<')) | ternary ('3.9', '3.12') }} \
5353
{% if cifmw_build_containers_install_from_source | bool %}
5454
--tcib-extra tcib_package= \
5555
{% endif %}

roles/repo_setup/tasks/ci_mirror.yml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,24 @@
88
become: "{{ not cifmw_repo_setup_output.startswith(ansible_user_dir) }}"
99
when:
1010
- mirror_path.stat.exists
11-
ansible.builtin.shell: |
12-
set -o pipefail
13-
source /etc/ci/mirror_info.sh
14-
sed -i -e "s|https://trunk.rdoproject.org|$NODEPOOL_RDO_PROXY|g" *.repo
15-
sed -i -e "s|http://mirror.stream.centos.org|$NODEPOOL_CENTOS_MIRROR|g" *.repo
16-
args:
17-
chdir: "{{ cifmw_repo_setup_output }}"
11+
block:
12+
- name: Use RDO proxy mirrors
13+
ansible.builtin.shell: |
14+
set -o pipefail
15+
source /etc/ci/mirror_info.sh
16+
sed -i -e "s|https://trunk.rdoproject.org|$NODEPOOL_RDO_PROXY|g" *.repo
17+
args:
18+
chdir: "{{ cifmw_repo_setup_output }}"
19+
20+
# TODO(rlandy) remove when CentOS 10 mirrors exist on Nodepool Hosts
21+
# mirror ref: http://mirror.regionone.vexxhost-nodepool-sf.rdoproject.org/centos-stream/
22+
- name: Use RDO CentOS mirrors (remove CentOS 10 conditional when Nodepool mirrors exist)
23+
when:
24+
- ansible_distribution | lower == 'centos'
25+
- ansible_distribution_major_version is not version('10', '==')
26+
ansible.builtin.shell: |
27+
set -o pipefail
28+
source /etc/ci/mirror_info.sh
29+
sed -i -e "s|http://mirror.stream.centos.org|$NODEPOOL_CENTOS_MIRROR|g" *.repo
30+
args:
31+
chdir: "{{ cifmw_repo_setup_output }}"

0 commit comments

Comments
 (0)