From: David Galloway Date: Wed, 14 Jul 2021 14:53:36 +0000 (-0400) Subject: testnode: Move stream-specific tasks to separate task list X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=96a025357afeb01a2972233b281397baf4e4ddd5;p=ceph-cm-ansible.git testnode: Move stream-specific tasks to separate task list Signed-off-by: David Galloway --- diff --git a/roles/testnode/tasks/yum/repos.yml b/roles/testnode/tasks/yum/repos.yml index 46d0452..278d8d7 100644 --- a/roles/testnode/tasks/yum/repos.yml +++ b/roles/testnode/tasks/yum/repos.yml @@ -1,19 +1,4 @@ --- -# In non-Stream CentOS versions, ceph-cm-ansible takes care of overwriting the Distro/ISO-provided repo files. -# Since we convert from CentOS 8.X to CentOS Stream, we have to delete the Stream repo files that the process creates. -# We just don't want to rely on CentOS' infra to provide our mirror lists. It has bitten us in the past. -- name: Clean up Stream distro-provided repos - shell: "rm -rvf /etc/yum.repos.d/*Stream*" - when: - - ansible_lsb.description is defined - - '"Stream" in ansible_lsb.description' - -- set_fact: - dash_stream: "-stream" - when: - - ansible_lsb.description is defined - - '"Stream" in ansible_lsb.description' - - name: Configure local mirrorlists template: src: 'mirrorlists/{{ ansible_distribution_major_version }}/{{ item }}' diff --git a/roles/testnode/tasks/yum/stream.yml b/roles/testnode/tasks/yum/stream.yml new file mode 100644 index 0000000..3bc1246 --- /dev/null +++ b/roles/testnode/tasks/yum/stream.yml @@ -0,0 +1,17 @@ +--- +# In non-Stream CentOS versions, ceph-cm-ansible takes care of overwriting the Distro/ISO-provided repo files. +# Since we convert from CentOS 8.X to CentOS Stream, we have to delete the Stream repo files that the process creates. +# We just don't want to rely on CentOS' infra to provide our mirror lists. It has bitten us in the past. +- name: Clean up Stream distro-provided repos + shell: "rm -rvf /etc/yum.repos.d/*Stream*" + when: + - ansible_lsb.description is defined + - '"Stream" in ansible_lsb.description' + +# Setting this var will add "-stream" to the mirrorlist/baseurl URLs in .repo files +- set_fact: + dash_stream: "-stream" + when: + - ansible_lsb.description is defined + - '"Stream" in ansible_lsb.description' + diff --git a/roles/testnode/tasks/yum_systems.yml b/roles/testnode/tasks/yum_systems.yml index 198d006..808a7bb 100644 --- a/roles/testnode/tasks/yum_systems.yml +++ b/roles/testnode/tasks/yum_systems.yml @@ -54,6 +54,12 @@ command: rpm --rebuilddb +- name: Perform CentOS Stream related tasks + import_tasks: yum/stream.yml + when: + - ansible_lsb.description is defined + - '"Stream" in ansible_lsb.description' + - name: Setup local repo files. import_tasks: yum/repos.yml tags: