- { 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: Rocky-9.5-x86_64, tags: ['rocky9.5'] }
+ - { role: cobbler_profile, distro_name: Rocky-10.0-x86_64, tags: ['rocky10.0'] }
- { 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'] }
# 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'
+#if $distro in ['RHEL', 'CentOS', 'Rocky']
#set distro_ver_major = $distro_ver.split(".")[0]
#set distro_ver_minor = $distro_ver.split(".")[1]
#end if
# 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'
+#if $distro in ['RHEL', 'CentOS', 'Rocky']
#set distro_ver_major = $distro_ver.split(".")[0]
#set distro_ver_minor = $distro_ver.split(".")[1]
#end if
# 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'
+#if $distro in ['RHEL', 'CentOS', 'Rocky']
#set distro_ver_major = $distro_ver.split(".")[0]
#set distro_ver_minor = $distro_ver.split(".")[1]
#end if
# 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'
+#if $distro in ['RHEL', 'CentOS', 'Rocky']
#set distro_ver_major = $distro_ver.split(".")[0]
#set distro_ver_minor = $distro_ver.split(".")[1]
#end if
#else
@base
#end if
-#if $distro == 'RHEL' or $distro == 'CentOS'
+#if $distro in ['RHEL', 'CentOS', 'Rocky']
#set distro_ver_major = $distro_ver.split(".")[0]
#set distro_ver_minor = $distro_ver.split(".")[1]
## These packages are available in all RHEL/CentOS versions but not Fedora
wget
smartmontools
selinux-policy-targeted
+#if $distro != 'Rocky'
gdisk
+#end if
# 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') or ($distro == 'CentOS')
+#if $distro in ['RHEL', 'CentOS', 'Rocky']
#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
+#else if ($distro in ['CentOS', 'Rocky']) and int($distro_ver) >= 9
#set script = '/etc/rc.d/rc.local'
systemctl enable rc-local.service
#else if $distro == 'openSUSE'
elif command -v apt-get &>/dev/null; then
echo -e "auto lo\niface lo inet loopback\n\nauto $nic\niface $nic inet dhcp" > /etc/network/interfaces
else
- echo -e "DEVICE=$nic\nBOOTPROTO=dhcp\nONBOOT=yes" > /etc/sysconfig/network-scripts/ifcfg-$nic
+ etcsysconfig=true
+ if ! echo -e "DEVICE=$nic\nBOOTPROTO=dhcp\nONBOOT=yes" > /etc/sysconfig/network-scripts/ifcfg-$nic; then
+ etcsysconfig=false
+ nmcli con add type ethernet ifname $nic con-name $nic ipv4.method auto
+ nmcli con up $nic
+ fi
fi
# Don't bail if NIC fails to go down or come up
{ set +e; } 2>/dev/null
# If we can't ping our Cobbler host, remove the DHCP config for this NIC.
# It must either be on a non-routable network or has no reachable DHCP server.
ifdown $nic
- rm -f /etc/sysconfig/network-scripts/ifcfg-$nic
+ if [ "$etcsysconfig" ]; then
+ rm -f /etc/sysconfig/network-scripts/ifcfg-$nic
+ else
+ nmcli connection delete $nic
+ fi
sed -i "/$nic/d" /etc/network/interfaces
# Go back to bailing if anything fails bringing the next NIC up
set -e
# #set hostname = $getVar('name','')
#set distro = $getVar('distro','').split("-")[0]
#set distro_ver = $getVar('distro','').split("-")[1]
-#if $distro == 'RHEL' or $distro == 'CentOS'
+#if $distro in ['RHEL', 'CentOS', 'Rocky']
#set distro_ver_major = $distro_ver.split(".")[0]
#set distro_ver_minor = $distro_ver.split(".")[1]
#end if
# Partition clearing information
+#if $distro == 'Rocky' and int($distro_ver_major) >= 10
+clearpart --all --disklabel msdos
+#else
clearpart --all --initlabel
+#end if
# Use all of /dev/sda for the root partition (20G minimum)
part / --fstype="ext4" --ondisk=sda --size=20000 --grow
# Clear the Master Boot Record
iso: https://download.rockylinux.org/pub/rocky/9/isos/x86_64/Rocky-9.5-x86_64-dvd.iso
sha256: ba60c3653640b5747610ddfb4d09520529bef2d1d83c1feb86b0c84dff31e04e
kickstart: cephlab_rhel.ks
+ "Rocky-10.0-x86_64":
+ iso: https://download.rockylinux.org/pub/rocky/10/isos/x86_64/Rocky-10.0-x86_64-dvd1.iso
+ sha256: 678ea3e1eea6f5d6c220c46fab34f5e0add260e7b64f0139ee3b9f7b7ca7d2f3
+ kickstart: cephlab_rhel.ks
+ kernel_options: "inst.ks=http://@@http_server@@/cblr/svc/op/ks/system/@@name@@"
"Ubuntu-12.04-server-x86_64":
iso: "http://releases.ubuntu.com/12.04/ubuntu-12.04.5-server-amd64.iso"
sha256: af224223de99e2a730b67d7785b657f549be0d63221188e105445f75fb8305c9