From 742d933dc8459cbcf82c216137324fd4f1682ead Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Fri, 15 Nov 2024 16:05:35 +0100 Subject: [PATCH] Replace usage of mirrorlist with an official Rocky mirror Out of the box Rocky image goes with mirrorlist defined, while baseurl is commented out. Until there're infra mirrors available, let's ensure we are not picking out of the mirror list as it proved itself being unreliable and 3rd party mirrors are getting desynced, which causes failures in CI. Change-Id: Id7593236f1ea121ae7cbc3fc0c58ca9df8a1deac --- zuul.d/playbooks/pre-gate-cleanup.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/zuul.d/playbooks/pre-gate-cleanup.yml b/zuul.d/playbooks/pre-gate-cleanup.yml index e55f2a9a07..bdb0f95884 100644 --- a/zuul.d/playbooks/pre-gate-cleanup.yml +++ b/zuul.d/playbooks/pre-gate-cleanup.yml @@ -33,6 +33,32 @@ state: absent when: ansible_pkg_mgr == 'dnf' + - name: Replace mirrorlist with specific mirrors for Rocky + when: + - ansible_facts['distribution'] | lower == 'rocky' + block: + - name: Comment out mirrorlist for Rocky + replace: + path: "/etc/yum.repos.d/{{ item }}" + regexp: "^(mirrorlist=.*)$" + replace: "#\\1" + with_items: + - rocky.repo + - rocky-extras.repo + - rocky-devel.repo + - rocky-addons.repo + + - name: Uncomment baseurl for Rocky + replace: + path: "/etc/yum.repos.d/{{ item }}" + regexp: "^#(baseurl=.*)$" + replace: "\\1" + with_items: + - rocky.repo + - rocky-extras.repo + - rocky-devel.repo + - rocky-addons.repo + - name: Adjust ssh server configuration based on STIG requirements vars: sshd_settings: