From ff35c64d337a286ac2864c8403c1840e28bb23b1 Mon Sep 17 00:00:00 2001 From: spmfox Date: Sun, 28 May 2023 10:02:07 -0400 Subject: Initial commit --- roles/libvirt/templates/kickstart/el8.ks | 51 ++++++++++++++++++++++++++++++++ roles/libvirt/templates/kickstart/el9.ks | 51 ++++++++++++++++++++++++++++++++ 2 files changed, 102 insertions(+) create mode 100644 roles/libvirt/templates/kickstart/el8.ks create mode 100644 roles/libvirt/templates/kickstart/el9.ks (limited to 'roles/libvirt/templates/kickstart') diff --git a/roles/libvirt/templates/kickstart/el8.ks b/roles/libvirt/templates/kickstart/el8.ks new file mode 100644 index 0000000..d574837 --- /dev/null +++ b/roles/libvirt/templates/kickstart/el8.ks @@ -0,0 +1,51 @@ +#version=RHEL8 +text +reboot + +repo --name="AppStream" --baseurl=file:///run/install/sources/mount-0000-cdrom/AppStream + +%packages +@^server-product-environment +kexec-tools + +%end + +# Keyboard layouts +keyboard --xlayouts='us' +# System language +lang en_US.UTF-8 + +# Network information +network --bootproto=dhcp --device=enp1s0 --noipv6 --activate +network --hostname={{ libvirt_kickstart_hostname }} + +# Use CDROM installation media +cdrom + +# Run the Setup Agent on first boot +firstboot --enable + +ignoredisk --only-use=vda +autopart +# Partition clearing information +clearpart --none --initlabel + +# System timezone +timezone {{ libvirt_kickstart_timezone }} --isUtc + +rootpw --iscrypted {{ libvirt_kickstart_root_password | password_hash("sha512") }} + +%post +mkdir -m0700 /root/.ssh/ + +cat </root/.ssh/authorized_keys +{{ libvirt_kickstart_root_ssh_key }} +EOF + +### set permissions +chmod 0600 /root/.ssh/authorized_keys + +### fix up selinux context +restorecon -R /root/.ssh/ + +%end diff --git a/roles/libvirt/templates/kickstart/el9.ks b/roles/libvirt/templates/kickstart/el9.ks new file mode 100644 index 0000000..4f57464 --- /dev/null +++ b/roles/libvirt/templates/kickstart/el9.ks @@ -0,0 +1,51 @@ +#version=RHEL9 +text +reboot + +repo --name="AppStream" --baseurl=file:///run/install/sources/mount-0000-cdrom/AppStream + +%packages +@^server-product-environment +kexec-tools + +%end + +# Keyboard layouts +keyboard --xlayouts='us' +# System language +lang en_US.UTF-8 + +# Network information +network --bootproto=dhcp --device=enp1s0 --noipv6 --activate +network --hostname={{ libvirt_kickstart_hostname }} + +# Use CDROM installation media +cdrom + +# Run the Setup Agent on first boot +firstboot --enable + +ignoredisk --only-use=vda +autopart +# Partition clearing information +clearpart --none --initlabel + +# System timezone +timezone {{ libvirt_kickstart_timezone }} --isUtc + +rootpw --iscrypted {{ libvirt_kickstart_root_password | password_hash("sha512") }} + +%post +mkdir -m0700 /root/.ssh/ + +cat </root/.ssh/authorized_keys +{{ libvirt_kickstart_root_ssh_key }} +EOF + +### set permissions +chmod 0600 /root/.ssh/authorized_keys + +### fix up selinux context +restorecon -R /root/.ssh/ + +%end -- cgit