]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
testnode: Move stream-specific tasks to separate task list
authorDavid Galloway <dgallowa@redhat.com>
Wed, 14 Jul 2021 14:53:36 +0000 (10:53 -0400)
committerDavid Galloway <dgallowa@redhat.com>
Wed, 14 Jul 2021 14:53:36 +0000 (10:53 -0400)
Signed-off-by: David Galloway <dgallowa@redhat.com>
roles/testnode/tasks/yum/repos.yml
roles/testnode/tasks/yum/stream.yml [new file with mode: 0644]
roles/testnode/tasks/yum_systems.yml

index 46d0452edcc5102313ab001f973cb4ed47f6a1ff..278d8d7f6ed0261d899bf7a61adc74d3b42429b8 100644 (file)
@@ -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 (file)
index 0000000..3bc1246
--- /dev/null
@@ -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'
+
index 198d006adcce6d07f0740a5fdfa798df10c54f19..808a7bbc2cdc1d4c3d90b843e2b0c6c8559958c8 100644 (file)
   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: