]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
cobbler: Put CentOS9 Stream repos in place during kickstart 701/head
authorDavid Galloway <dgallowa@redhat.com>
Wed, 24 Aug 2022 21:40:40 +0000 (17:40 -0400)
committerDavid Galloway <dgallowa@redhat.com>
Wed, 24 Aug 2022 21:40:57 +0000 (17:40 -0400)
Signed-off-by: David Galloway <dgallowa@redhat.com>
roles/cobbler/defaults/main.yml
roles/cobbler/templates/kickstarts/cephlab_rhel.ks
roles/cobbler/templates/kickstarts/cephlab_rhel_sdc.ks
roles/cobbler/templates/kickstarts/cephlab_rhel_sdi.ks
roles/cobbler/templates/kickstarts/cephlab_rhel_sdm.ks
roles/cobbler/templates/snippets/cephlab_centos9_repos [new file with mode: 0644]
roles/cobbler/templates/triggers/install/post/cephlab_ansible.sh

index 1709277153d8ce7f06443614aeeac97d2e4ba2cc..26124feed85965ca55e2a3a7f398ac09fbfa33ec 100644 (file)
@@ -43,6 +43,7 @@ snippets:
   - cephlab_rhel_disks
   - cephlab_post_install_kernel_options
   - cephlab_rhel_rhsm
+  - cephlab_centos9_repos
 
 scripts:
   - cephlab_preseed_late
index b1b93cf4d74779213f743b9aa5f167b5cbc32a40..17c255cf0fa4964a6c65bc997ca7dd19209ae1ad 100644 (file)
@@ -87,6 +87,10 @@ $SNIPPET('cephlab_user')
 $SNIPPET('cephlab_rhel_rhsm')
 #end if
 #if distro_ver_minor == 'stream'
+# Put CentOS 9 Stream repos in place
+#if int($distro_ver_major) == 9
+$SNIPPET('cephlab_centos9_repos')
+#end if
 # We want the latest packages because it's Stream
 yum -y update
 #else
index 3b61db739e62f55baa147dc97ac8a1ddadb010b0..e2e95a112457fc61d96a8dadc370c3fe62a3bc51 100644 (file)
@@ -101,6 +101,10 @@ $SNIPPET('cephlab_user')
 $SNIPPET('cephlab_rhel_rhsm')
 #end if
 #if distro_ver_minor == 'stream'
+# Put CentOS 9 Stream repos in place
+#if int($distro_ver_major) == 9
+$SNIPPET('cephlab_centos9_repos')
+#end if
 # We want the latest packages because it's Stream
 yum -y update
 #else
index 06be6a3b35555306f1a91221a9ee3c6a0417c2c3..491b195d30aa7f79d80430e95bfc7d3a975132a4 100644 (file)
@@ -101,6 +101,9 @@ $SNIPPET('cephlab_user')
 $SNIPPET('cephlab_rhel_rhsm')
 #end if
 #if distro_ver_minor == 'stream'
+#if int($distro_ver_major) == 9
+$SNIPPET('cephlab_centos9_repos')
+#end if
 # We want the latest packages because it's Stream
 yum -y update
 #else
index 744bd9fe7190a0a697ef5997b589b705906ea65e..97be7f86ec9a10cabc0f4fdc3f0fda83b972ab17 100644 (file)
@@ -101,6 +101,9 @@ $SNIPPET('cephlab_user')
 $SNIPPET('cephlab_rhel_rhsm')
 #end if
 #if distro_ver_minor == 'stream'
+#if int($distro_ver_major) == 9
+$SNIPPET('cephlab_centos9_repos')
+#end if
 # We want the latest packages because it's Stream
 yum -y update
 #else
diff --git a/roles/cobbler/templates/snippets/cephlab_centos9_repos b/roles/cobbler/templates/snippets/cephlab_centos9_repos
new file mode 100644 (file)
index 0000000..ef22863
--- /dev/null
@@ -0,0 +1,20 @@
+# For some reason, when kickstarting a CentOS 9 installation,
+# BaseOS and AppStream repos are missing out the gate.
+
+cat >> /etc/yum.repos.d/CentOS-BaseOS.repo << EOF
+[CentOS-Base]
+baseurl=https://composes.stream.centos.org/production/latest-CentOS-Stream/compose/BaseOS/$basearch/os/
+enabled=1
+gpgcheck=1
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
+name=CentOS-$releasever - Base
+EOF
+
+cat >> /etc/yum.repos.d/CentOS-AppStream.repo << EOF
+[CentOS-AppStream]
+baseurl=https://composes.stream.centos.org/production/latest-CentOS-Stream/compose/AppStream/$basearch/os/
+enabled=1
+gpgcheck=1
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
+name=CentOS-$releasever - AppStream
+EOF
index 0fa62f0986f6b7f1c563c5e1922fbb6625ee5750..3120bf551220c2cae67b9c0d199ceea669106449 100644 (file)
@@ -36,10 +36,6 @@ export ANSIBLE_HOST_KEY_CHECKING=False
 if [[ $profile == *"8.stream"* ]]
 then
     ansible-playbook tools/convert-to-centos-stream.yml -v --limit $name* 2>&1 >> /var/log/ansible/$name.log
-elif [[ $profile == *"9.stream"* ]]
-then
-    # For some reason, we end up with no repos on the first boot without doing this.
-    ansible-playbook testnodes.yml --tags repos -v --limit $name* 2>&1 >> /var/log/ansible/$name.log
 fi
 
 # Tell ansible to create users, populate authorized_keys, and zap non-root disks