]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
Add CentOS 9 Stream 622/head
authorDavid Galloway <dgallowa@redhat.com>
Fri, 14 May 2021 19:19:15 +0000 (15:19 -0400)
committerDavid Galloway <dgallowa@redhat.com>
Wed, 19 May 2021 16:11:17 +0000 (12:11 -0400)
Signed-off-by: David Galloway <dgallowa@redhat.com>
14 files changed:
cobbler.yml
roles/cobbler/templates/kickstarts/cephlab_rhel.ks
roles/cobbler/templates/kickstarts/cephlab_rhel_sdi.ks
roles/cobbler/templates/kickstarts/cephlab_rhel_sdm.ks
roles/cobbler/templates/snippets/cephlab_packages_rhel
roles/cobbler/templates/snippets/cephlab_rc_local
roles/cobbler/templates/triggers/install/post/cephlab_ansible.sh
roles/cobbler_profile/defaults/main.yml
roles/common/tasks/main.yml
roles/common/tasks/yum_systems.yml
roles/common/vars/centos_9.yml [new file with mode: 0644]
roles/container-host/vars/centos_9.yml [new file with mode: 0644]
roles/testnode/templates/ssh/sshd_config_centos_9 [new file with mode: 0644]
roles/testnode/vars/centos_9.yml [new file with mode: 0644]

index 834ee4f7b4a0480c0e2c198fe76b99b730b03dae..45ea16d97078577179a49bd4c839bf757c70676a 100644 (file)
@@ -41,6 +41,7 @@
     - { role: cobbler_profile, distro_name: CentOS-8.2-x86_64, tags: ['centos8.2'] }
     - { role: cobbler_profile, distro_name: CentOS-8.3-x86_64, tags: ['centos8.3'] }
     - { role: cobbler_profile, distro_name: CentOS-8.stream-x86_64, tags: ['centos8.stream'] }
+    - { role: cobbler_profile, distro_name: CentOS-9.stream-x86_64, tags: ['centos9.stream'] }
     - { role: cobbler_profile, distro_name: Ubuntu-12.04-server-x86_64, tags: ['ubuntu-precise'] }
     - { role: cobbler_profile, distro_name: Ubuntu-14.04-server-x86_64, tags: ['ubuntu-trusty'] }
     - { role: cobbler_profile, distro_name: Ubuntu-15.04-server-x86_64, tags: ['ubuntu-vivid'] }
index 2c6ff565e81b896c7b26fb243934f3337670f0aa..f59763f11471b389a7e5f86a5af3a50126481cef 100644 (file)
@@ -2,10 +2,20 @@
 # kickstart template for Fedora 8 and later.
 # (includes %end blocks)
 # do not use with earlier distros
+#set distro = $getVar('distro','').split("-")[0]
+#set distro_ver = $getVar('distro','').split("-")[1]
+#if $distro == 'RHEL' or $distro == 'CentOS'
+#set distro_ver_major = $distro_ver.split(".")[0]
+#set distro_ver_minor = $distro_ver.split(".")[1]
+#end if
 
 #platform=x86, AMD64, or Intel EM64T
 # System authorization information
+#if int($distro_ver_major) < 9
 auth  --useshadow  --enablemd5
+#else
+authselect select minimal
+#end if
 $SNIPPET('cephlab_rhel_disks')
 # Use text mode install
 text
@@ -34,8 +44,10 @@ selinux --enforcing
 skipx
 # System timezone
 timezone Etc/UTC --utc
+#if int($distro_ver_major) < 9
 # Install OS instead of upgrade
 install
+#end if
 
 %pre
 $SNIPPET('log_ks_pre')
index 21f6fe621c45c16dbe4797eb5a4e3aed3a215a38..f2ee0c661656bb8a6b78d031b02ca675528c7760 100644 (file)
@@ -3,10 +3,20 @@
 # kickstart template for Fedora 8 and later.
 # (includes %end blocks)
 # do not use with earlier distros
+#set distro = $getVar('distro','').split("-")[0]
+#set distro_ver = $getVar('distro','').split("-")[1]
+#if $distro == 'RHEL' or $distro == 'CentOS'
+#set distro_ver_major = $distro_ver.split(".")[0]
+#set distro_ver_minor = $distro_ver.split(".")[1]
+#end if
 
 #platform=x86, AMD64, or Intel EM64T
 # System authorization information
+#if int($distro_ver_major) < 9
 auth  --useshadow  --enablemd5
+#else
+authselect select minimal
+#end if
 #set os_version = $getVar('os_version','')
 # Partition clearing information
 clearpart --all --initlabel
@@ -48,8 +58,10 @@ selinux --enforcing
 skipx
 # System timezone
 timezone Etc/UTC --utc
+#if int($distro_ver_major) < 9
 # Install OS instead of upgrade
 install
+#end if
 
 %pre
 $SNIPPET('log_ks_pre')
index 8a7de9a8654b086611c86a2571430fd31c6fca53..a47bef442c62b9fc3966da28bf66edc5c9c16043 100644 (file)
@@ -3,10 +3,20 @@
 # kickstart template for Fedora 8 and later.
 # (includes %end blocks)
 # do not use with earlier distros
+#set distro = $getVar('distro','').split("-")[0]
+#set distro_ver = $getVar('distro','').split("-")[1]
+#if $distro == 'RHEL' or $distro == 'CentOS'
+#set distro_ver_major = $distro_ver.split(".")[0]
+#set distro_ver_minor = $distro_ver.split(".")[1]
+#end if
 
 #platform=x86, AMD64, or Intel EM64T
 # System authorization information
+#if int($distro_ver_major) < 9
 auth  --useshadow  --enablemd5
+#else
+authselect select minimal
+#end if
 #set os_version = $getVar('os_version','')
 # Partition clearing information
 clearpart --all --initlabel
@@ -48,8 +58,10 @@ selinux --enforcing
 skipx
 # System timezone
 timezone Etc/UTC --utc
+#if int($distro_ver_major) < 9
 # Install OS instead of upgrade
 install
+#end if
 
 %pre
 $SNIPPET('log_ks_pre')
index 5db78d3ac7d171537b389498cf79548e5c77c2f8..392ffa39e0f15d07f748bd71005894db9364f554 100644 (file)
@@ -15,8 +15,11 @@ python3
 #set distro_ver_minor = $distro_ver.split(".")[1]
 ## These packages are available in all RHEL/CentOS versions but not Fedora
 perl
+## These packages are not available in CentOS 9 Stream
+#if int($distro_ver_major) < 9
 redhat-lsb-core
-#if not int($distro_ver_major) == 8
+#end if
+#if int($distro_ver_major) < 8
 ## These packages should be installed on RHEL/CentOS 7
 libselinux-python
 libsemanage-python
index 425e326ea0c55882ec20cfe48d6092353d73885b..6705c5cb00c9ec32771f16887362bf52777be8cc 100644 (file)
@@ -3,11 +3,14 @@
 # Set proper location for firstboot ansible post-install trigger
 #set distro = $getVar('distro','').split("-")[0]
 #set distro_ver = $getVar('distro','').split("-")[1]
-#if $distro == 'RHEL'
+#if ($distro == 'RHEL') or ($distro == 'CentOS')
 #set distro_ver = $distro_ver.split(".")[0]
 #end if
 #if ($distro == 'Fedora' and int($distro_ver) >= 22) or ($distro == 'RHEL' and int($distro_ver) >= 8)
 #set script = '/etc/rc.d/rc.local'
+#else if $distro == 'CentOS' and int($distro_ver) >= 9
+#set script = '/etc/rc.d/rc.local'
+systemctl enable rc-local.service
 #else if $distro == 'openSUSE'
 #set script = '/etc/init.d/boot.local'
 #else
index 1baf9ffe2662c32d2a6c7f80133f8790cfc2ac8a..2c496af630f30d709fa7bcfdc994e8c5c232b386 100644 (file)
@@ -40,6 +40,10 @@ then
 elif [[ $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
 ansible-playbook testnodes.yml -v --limit $name* --skip-tags user,pubkeys,zap 2>&1 >> /var/log/ansible/$name.log &
 popd
index 3f35308458f03eccc409f06868a2a631e0e065ef..81801007f84e787b7eda8dbc2f1e4e8f9c7df200 100644 (file)
@@ -44,6 +44,10 @@ distros:
       iso: ""
   "CentOS-8.stream-x86_64":
       iso: ""
+  "CentOS-9.stream-x86_64":
+      iso: https://composes.stream.centos.org/test/latest-CentOS-Stream/compose/BaseOS/x86_64/iso/CentOS-Stream-9-20210512.t.3-x86_64-dvd1.iso
+      sha256: 9b05f2ec63c8c24050b23ed2db19ea9bdfe567f50d3c10423824be91f40fbd85
+      kickstart: cephlab_rhel.ks
   "Fedora-22-Server-x86_64":
       iso: http://ftp.linux.ncsu.edu/mirror/ftp.redhat.com/pub/fedora/linux/releases/22/Server/x86_64/iso/Fedora-Server-DVD-x86_64-22.iso
       sha256: b2acfa7c7c6b5d2f51d3337600c2e52eeaa1a1084991181c28ca30343e52e0df
index 3b62098223a97a5036d056b3c7cf991ed5268a5e..c03c3c60857fa1fba50e93b7f9639e8d575ed0bc 100644 (file)
     - monitoring-scripts
     - nagios
 
-# configure nagios (Except OpenSUSE and RHEL8)
+# configure nagios (Except OpenSUSE and CentOS 9 Stream)
 - import_tasks: nagios.yml
-  when: ansible_pkg_mgr != "zypper"
+  when:
+    - ansible_pkg_mgr != "zypper"
+    - not (ansible_distribution == "CentOS" and ansible_distribution_major_version == "9")
   tags:
     - nagios
 
index 9318053d743ac8159aaaedf3bd66ba762c733911..494978838101fc81e5c5aa5ed5fd59a4ebf36e33 100644 (file)
@@ -72,7 +72,9 @@
 
 # create and manage epel.repo
 - import_tasks: epel.yml
-  when: (ansible_distribution == "CentOS" or ansible_distribution == 'RedHat')
+  when:
+    - (ansible_distribution == "CentOS" or ansible_distribution == 'RedHat')
+    - ansible_distribution_major_version|int < 9
   tags:
     - epel
     - repos
diff --git a/roles/common/vars/centos_9.yml b/roles/common/vars/centos_9.yml
new file mode 100644 (file)
index 0000000..9af7db3
--- /dev/null
@@ -0,0 +1,4 @@
+---
+nrpe_selinux_packages:
+  - python3-libsemanage
+  - python3-policycoreutils
diff --git a/roles/container-host/vars/centos_9.yml b/roles/container-host/vars/centos_9.yml
new file mode 100644 (file)
index 0000000..9ca52e4
--- /dev/null
@@ -0,0 +1,5 @@
+---
+container_packages:
+  - podman
+# Doesn't exist yet
+#  - podman-docker
diff --git a/roles/testnode/templates/ssh/sshd_config_centos_9 b/roles/testnode/templates/ssh/sshd_config_centos_9
new file mode 100644 (file)
index 0000000..087d4c7
--- /dev/null
@@ -0,0 +1,38 @@
+# {{ ansible_managed }}
+#      $OpenBSD: sshd_config,v 1.90 2013/05/16 04:09:14 dtucker Exp $
+
+# This is the sshd server system-wide configuration file.  See
+# sshd_config(5) for more information.
+
+# This sshd was compiled with PATH=/usr/local/bin:/usr/bin
+
+HostKey /etc/ssh/ssh_host_rsa_key
+HostKey /etc/ssh/ssh_host_ecdsa_key
+
+SyslogFacility AUTHPRIV
+
+AuthorizedKeysFile     .ssh/authorized_keys
+
+PasswordAuthentication yes
+
+ChallengeResponseAuthentication no
+
+# GSSAPI options
+GSSAPIAuthentication yes
+GSSAPICleanupCredentials yes
+
+UsePAM yes
+
+X11Forwarding yes
+UsePrivilegeSeparation sandbox         # Default for new installations.
+
+# Accept locale-related environment variables
+AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
+AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
+AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE
+AcceptEnv XMODIFIERS
+
+# override default of no subsystems
+Subsystem      sftp    /usr/libexec/openssh/sftp-server
+
+MaxSessions 1000
diff --git a/roles/testnode/vars/centos_9.yml b/roles/testnode/vars/centos_9.yml
new file mode 100644 (file)
index 0000000..2da8b37
--- /dev/null
@@ -0,0 +1,82 @@
+---
+# vars specific to any centos 9.x version
+
+common_yum_repos: {}
+
+yum_repos:
+  CentOS-AppStream:
+    name: "CentOS-$releasever - AppStream"
+    baseurl: https://composes.stream.centos.org/test/latest-CentOS-Stream/compose/AppStream/x86_64/os/
+    gpgcheck: 0
+    enabled: 1
+    gpgkey: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
+  CentOS-Base:
+    name: "CentOS-$releasever - Base"
+    baseurl: https://composes.stream.centos.org/test/latest-CentOS-Stream/compose/BaseOS/x86_64/os/
+    gpgcheck: 0
+    enabled: 1
+    gpgkey: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
+
+# When mirrors become available, these will be filenames in roles/testnodes/templates/mirrorlists/9/
+yum_mirrorlists: []
+
+packages_to_upgrade:
+  - libgcrypt # explicitly tied to qemu build
+
+packages:
+  # for package-cleanup
+  - dnf-utils
+  - sysstat
+  - libedit
+  - boost-thread
+  - xfsprogs
+  - gdisk
+  - parted
+  - libgcrypt
+  - fuse-libs
+  - openssl
+  - libuuid
+  - podman
+  # for cephadmunit.py to uniformly run 'docker kill -p ...'
+# Doesn't exist yet
+#  - podman-docker
+  - attr
+#  - ant
+  - lsof
+  - gettext
+  - bc
+  - xfsdump
+  - blktrace
+  - usbredir
+#  - libev-devel
+  - valgrind
+  - nfs-utils
+  # for xfstests
+  - ncurses-devel
+  # for s3 tests
+  # for workunits,
+  - gcc
+  - git
+  # qa/workunits/rados/test_python.sh
+#  - python3-nose
+  # for cram tests
+#  - python3-virtualenv
+  # for rbd qemu tests
+  - genisoimage
+  - qemu-img
+  - qemu-kvm-core
+  - qemu-kvm-block-rbd
+  # for pjd tests
+  - libacl-devel
+  # for fs tests,
+#  - dbench
+  - autoconf
+  # for test-crash.sh
+  - gdb
+#  - iozone
+
+epel_packages: []
+
+nfs_service: nfs-server
+
+ntp_service_name: chronyd