Blame SOURCES/scap-security-guide-0.1.58-rhel7_cis_kickstarts-PR_7382.patch

362bfa
From ee2da171d5a76202b2aef8231c5af6f97ef156ef Mon Sep 17 00:00:00 2001
362bfa
From: Vojtech Polasek <vpolasek@redhat.com>
362bfa
Date: Thu, 12 Aug 2021 10:36:30 +0200
362bfa
Subject: [PATCH 1/2] add rhel7 kickstarts for cis
362bfa
362bfa
---
362bfa
 products/rhel7/kickstart/ssg-rhel7-cis-ks.cfg |   4 +-
362bfa
 .../kickstart/ssg-rhel7-cis_server_l1-ks.cfg  | 136 ++++++++++++++++
362bfa
 .../ssg-rhel7-cis_workstation_l1-ks.cfg       | 137 ++++++++++++++++
362bfa
 .../ssg-rhel7-cis_workstation_l2-ks.cfg       | 147 ++++++++++++++++++
362bfa
 4 files changed, 422 insertions(+), 2 deletions(-)
362bfa
 create mode 100644 products/rhel7/kickstart/ssg-rhel7-cis_server_l1-ks.cfg
362bfa
 create mode 100644 products/rhel7/kickstart/ssg-rhel7-cis_workstation_l1-ks.cfg
362bfa
 create mode 100644 products/rhel7/kickstart/ssg-rhel7-cis_workstation_l2-ks.cfg
362bfa
362bfa
diff --git a/products/rhel7/kickstart/ssg-rhel7-cis-ks.cfg b/products/rhel7/kickstart/ssg-rhel7-cis-ks.cfg
362bfa
index 6ead435b978..00edb9d536c 100644
362bfa
--- a/products/rhel7/kickstart/ssg-rhel7-cis-ks.cfg
362bfa
+++ b/products/rhel7/kickstart/ssg-rhel7-cis-ks.cfg
362bfa
@@ -1,6 +1,6 @@
362bfa
-# SCAP Security Guide CIS profile kickstart for Red Hat Enterprise Linux 7 Server
362bfa
+# SCAP Security Guide CIS profile (Leve 2 - Server) kickstart for Red Hat Enterprise Linux 7 Server
362bfa
 # Version: 0.0.1
362bfa
-# Date: 2020-03-30
362bfa
+# Date: 2021-08-12
362bfa
 #
362bfa
 # Based on:
362bfa
 # https://pykickstart.readthedocs.io/en/latest/
362bfa
diff --git a/products/rhel7/kickstart/ssg-rhel7-cis_server_l1-ks.cfg b/products/rhel7/kickstart/ssg-rhel7-cis_server_l1-ks.cfg
362bfa
new file mode 100644
362bfa
index 00000000000..333105c4f9e
362bfa
--- /dev/null
362bfa
+++ b/products/rhel7/kickstart/ssg-rhel7-cis_server_l1-ks.cfg
362bfa
@@ -0,0 +1,136 @@
362bfa
+# SCAP Security Guide CIS profile (Level 1 - Server) kickstart for Red Hat Enterprise Linux 7 Server
362bfa
+# Version: 0.0.1
362bfa
+# Date: 2021-08-12
362bfa
+#
362bfa
+# Based on:
362bfa
+# https://pykickstart.readthedocs.io/en/latest/
362bfa
+# https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/sect-kickstart-syntax.html
362bfa
+
362bfa
+# Install a fresh new system (optional)
362bfa
+install
362bfa
+
362bfa
+# Specify installation method to use for installation
362bfa
+# To use a different one comment out the 'url' one below, update
362bfa
+# the selected choice with proper options & un-comment it
362bfa
+#
362bfa
+# Install from an installation tree on a remote server via FTP or HTTP:
362bfa
+# --url		the URL to install from
362bfa
+#
362bfa
+# Example:
362bfa
+#
362bfa
+# url --url=http://192.168.122.1/image
362bfa
+#
362bfa
+# Modify concrete URL in the above example appropriately to reflect the actual
362bfa
+# environment machine is to be installed in
362bfa
+#
362bfa
+# Other possible / supported installation methods:
362bfa
+# * install from the first CD-ROM/DVD drive on the system:
362bfa
+#
362bfa
+# cdrom
362bfa
+#
362bfa
+# * install from a directory of ISO images on a local drive:
362bfa
+#
362bfa
+# harddrive --partition=hdb2 --dir=/tmp/install-tree
362bfa
+#
362bfa
+# * install from provided NFS server:
362bfa
+#
362bfa
+# nfs --server=<hostname> --dir=<directory> [--opts=<nfs options>]
362bfa
+#
362bfa
+
362bfa
+# Set language to use during installation and the default language to use on the installed system (required)
362bfa
+lang en_US.UTF-8
362bfa
+
362bfa
+# Set system keyboard type / layout (required)
362bfa
+keyboard us
362bfa
+
362bfa
+# Configure network information for target system and activate network devices in the installer environment (optional)
362bfa
+# --onboot	enable device at a boot time
362bfa
+# --device	device to be activated and / or configured with the network command
362bfa
+# --bootproto	method to obtain networking configuration for device (default dhcp)
362bfa
+# --noipv6	disable IPv6 on this device
362bfa
+#
362bfa
+# NOTE: Usage of DHCP will fail CCE-27021-5 (DISA FSO RHEL-06-000292). To use static IP configuration,
362bfa
+#       "--bootproto=static" must be used. For example:
362bfa
+# network --bootproto=static --ip=10.0.2.15 --netmask=255.255.255.0 --gateway=10.0.2.254 --nameserver 192.168.2.1,192.168.3.1
362bfa
+#
362bfa
+network --onboot yes --device eth0 --bootproto dhcp --noipv6
362bfa
+
362bfa
+# Set the system's root password (required)
362bfa
+# Plaintext password is: server
362bfa
+# Refer to e.g. https://pykickstart.readthedocs.io/en/latest/commands.html#rootpw to see how to create
362bfa
+# encrypted password form for different plaintext password
362bfa
+rootpw --iscrypted $6$/0RYeeRdK70ynvYz$jH2ZN/80HM6DjndHMxfUF9KIibwipitvizzXDH1zW.fTjyD3RD3tkNdNUaND18B/XqfAUW3vy1uebkBybCuIm0
362bfa
+
362bfa
+# The selected profile will restrict root login
362bfa
+# Add a user that can login and escalate privileges
362bfa
+# Plaintext password is: admin123
362bfa
+user --name=admin --groups=wheel --password=$6$Ga6ZnIlytrWpuCzO$q0LqT1USHpahzUafQM9jyHCY9BiE5/ahXLNWUMiVQnFGblu0WWGZ1e6icTaCGO4GNgZNtspp1Let/qpM7FMVB0 --iscrypted
362bfa
+
362bfa
+# Configure firewall settings for the system (optional)
362bfa
+# --enabled	reject incoming connections that are not in response to outbound requests
362bfa
+# --ssh		allow sshd service through the firewall
362bfa
+firewall --enabled --ssh
362bfa
+
362bfa
+# Set up the authentication options for the system (required)
362bfa
+# --enableshadow	enable shadowed passwords by default
362bfa
+# --passalgo		hash / crypt algorithm for new passwords
362bfa
+# See the manual page for authconfig for a complete list of possible options.
362bfa
+authconfig --enableshadow --passalgo=sha512
362bfa
+
362bfa
+# State of SELinux on the installed system (optional)
362bfa
+# Defaults to enforcing
362bfa
+selinux --enforcing
362bfa
+
362bfa
+# Set the system time zone (required)
362bfa
+timezone --utc America/New_York
362bfa
+
362bfa
+# Specify how the bootloader should be installed (required)
362bfa
+# Plaintext password is: password
362bfa
+# Refer to e.g. https://pykickstart.readthedocs.io/en/latest/commands.html#rootpw to see how to create
362bfa
+# encrypted password form for different plaintext password
362bfa
+bootloader --location=mbr --append="crashkernel=auto rhgb quiet" --password=$6$zCPaBARiNlBYUAS7$40phthWpqvaPVz3QUeIK6n5qoazJDJD5Nlc9OKy5SyYoX9Rt4jFaLjzqJCwpgR4RVAEFSADsqQot0WKs5qNto0
362bfa
+
362bfa
+# Initialize (format) all disks (optional)
362bfa
+zerombr
362bfa
+
362bfa
+# The following partition layout scheme assumes disk of size 20GB or larger
362bfa
+# Modify size of partitions appropriately to reflect actual machine's hardware
362bfa
+#
362bfa
+# Remove Linux partitions from the system prior to creating new ones (optional)
362bfa
+# --linux	erase all Linux partitions
362bfa
+# --initlabel	initialize the disk label to the default based on the underlying architecture
362bfa
+clearpart --linux --initlabel
362bfa
+
362bfa
+# Create primary system partitions (required for installs)
362bfa
+part /boot --fstype=xfs --size=512
362bfa
+part pv.01 --grow --size=1
362bfa
+
362bfa
+# Create a Logical Volume Management (LVM) group (optional)
362bfa
+volgroup VolGroup --pesize=4096 pv.01
362bfa
+
362bfa
+# Create particular logical volumes (optional)
362bfa
+logvol / --fstype=xfs --name=LogVol06 --vgname=VolGroup --size=11264 --grow
362bfa
+# Ensure /tmp Located On Separate Partition
362bfa
+logvol /tmp --fstype=xfs --name=LogVol01 --vgname=VolGroup --size=1024 --fsoptions="nodev,noexec,nosuid"
362bfa
+logvol swap --name=lv_swap --vgname=VolGroup --size=2016
362bfa
+
362bfa
+
362bfa
+# Harden installation with CIS profile
362bfa
+# For more details and configuration options see command %addon org_fedora_oscap in
362bfa
+# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/installation_guide/sect-kickstart-syntax#sect-kickstart-commands
362bfa
+%addon org_fedora_oscap
362bfa
+        content-type = scap-security-guide
362bfa
+        profile = xccdf_org.ssgproject.content_profile_cis_server_l1
362bfa
+%end
362bfa
+
362bfa
+# Packages selection (%packages section is required)
362bfa
+%packages
362bfa
+
362bfa
+# Require @Base
362bfa
+@Base
362bfa
+
362bfa
+%end # End of %packages section
362bfa
+
362bfa
+# Reboot after the installation is complete (optional)
362bfa
+# --eject	attempt to eject CD or DVD media before rebooting
362bfa
+reboot --eject
362bfa
diff --git a/products/rhel7/kickstart/ssg-rhel7-cis_workstation_l1-ks.cfg b/products/rhel7/kickstart/ssg-rhel7-cis_workstation_l1-ks.cfg
362bfa
new file mode 100644
362bfa
index 00000000000..7ca9fe8558b
362bfa
--- /dev/null
362bfa
+++ b/products/rhel7/kickstart/ssg-rhel7-cis_workstation_l1-ks.cfg
362bfa
@@ -0,0 +1,137 @@
362bfa
+# SCAP Security Guide CIS profile (Level 1 - Workstation) kickstart for Red Hat Enterprise Linux 7 Server
362bfa
+# Version: 0.0.1
362bfa
+# Date: 2021-08-12
362bfa
+#
362bfa
+# Based on:
362bfa
+# https://pykickstart.readthedocs.io/en/latest/
362bfa
+# https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/sect-kickstart-syntax.html
362bfa
+
362bfa
+# Install a fresh new system (optional)
362bfa
+install
362bfa
+
362bfa
+# Specify installation method to use for installation
362bfa
+# To use a different one comment out the 'url' one below, update
362bfa
+# the selected choice with proper options & un-comment it
362bfa
+#
362bfa
+# Install from an installation tree on a remote server via FTP or HTTP:
362bfa
+# --url		the URL to install from
362bfa
+#
362bfa
+# Example:
362bfa
+#
362bfa
+# url --url=http://192.168.122.1/image
362bfa
+#
362bfa
+# Modify concrete URL in the above example appropriately to reflect the actual
362bfa
+# environment machine is to be installed in
362bfa
+#
362bfa
+# Other possible / supported installation methods:
362bfa
+# * install from the first CD-ROM/DVD drive on the system:
362bfa
+#
362bfa
+# cdrom
362bfa
+#
362bfa
+# * install from a directory of ISO images on a local drive:
362bfa
+#
362bfa
+# harddrive --partition=hdb2 --dir=/tmp/install-tree
362bfa
+#
362bfa
+# * install from provided NFS server:
362bfa
+#
362bfa
+# nfs --server=<hostname> --dir=<directory> [--opts=<nfs options>]
362bfa
+#
362bfa
+
362bfa
+# Set language to use during installation and the default language to use on the installed system (required)
362bfa
+lang en_US.UTF-8
362bfa
+
362bfa
+# Set system keyboard type / layout (required)
362bfa
+keyboard us
362bfa
+
362bfa
+# Configure network information for target system and activate network devices in the installer environment (optional)
362bfa
+# --onboot	enable device at a boot time
362bfa
+# --device	device to be activated and / or configured with the network command
362bfa
+# --bootproto	method to obtain networking configuration for device (default dhcp)
362bfa
+# --noipv6	disable IPv6 on this device
362bfa
+#
362bfa
+# NOTE: Usage of DHCP will fail CCE-27021-5 (DISA FSO RHEL-06-000292). To use static IP configuration,
362bfa
+#       "--bootproto=static" must be used. For example:
362bfa
+# network --bootproto=static --ip=10.0.2.15 --netmask=255.255.255.0 --gateway=10.0.2.254 --nameserver 192.168.2.1,192.168.3.1
362bfa
+#
362bfa
+network --onboot yes --device eth0 --bootproto dhcp --noipv6
362bfa
+
362bfa
+# Set the system's root password (required)
362bfa
+# Plaintext password is: server
362bfa
+# Refer to e.g. https://pykickstart.readthedocs.io/en/latest/commands.html#rootpw to see how to create
362bfa
+# encrypted password form for different plaintext password
362bfa
+rootpw --iscrypted $6$/0RYeeRdK70ynvYz$jH2ZN/80HM6DjndHMxfUF9KIibwipitvizzXDH1zW.fTjyD3RD3tkNdNUaND18B/XqfAUW3vy1uebkBybCuIm0
362bfa
+
362bfa
+# The selected profile will restrict root login
362bfa
+# Add a user that can login and escalate privileges
362bfa
+# Plaintext password is: admin123
362bfa
+user --name=admin --groups=wheel --password=$6$Ga6ZnIlytrWpuCzO$q0LqT1USHpahzUafQM9jyHCY9BiE5/ahXLNWUMiVQnFGblu0WWGZ1e6icTaCGO4GNgZNtspp1Let/qpM7FMVB0 --iscrypted
362bfa
+
362bfa
+# Configure firewall settings for the system (optional)
362bfa
+# --enabled	reject incoming connections that are not in response to outbound requests
362bfa
+# --ssh		allow sshd service through the firewall
362bfa
+firewall --enabled --ssh
362bfa
+
362bfa
+# Set up the authentication options for the system (required)
362bfa
+# --enableshadow	enable shadowed passwords by default
362bfa
+# --passalgo		hash / crypt algorithm for new passwords
362bfa
+# See the manual page for authconfig for a complete list of possible options.
362bfa
+authconfig --enableshadow --passalgo=sha512
362bfa
+
362bfa
+# State of SELinux on the installed system (optional)
362bfa
+# Defaults to enforcing
362bfa
+selinux --enforcing
362bfa
+
362bfa
+# Set the system time zone (required)
362bfa
+timezone --utc America/New_York
362bfa
+
362bfa
+# Specify how the bootloader should be installed (required)
362bfa
+# Plaintext password is: password
362bfa
+# Refer to e.g. https://pykickstart.readthedocs.io/en/latest/commands.html#rootpw to see how to create
362bfa
+# encrypted password form for different plaintext password
362bfa
+bootloader --location=mbr --append="crashkernel=auto rhgb quiet" --password=$6$zCPaBARiNlBYUAS7$40phthWpqvaPVz3QUeIK6n5qoazJDJD5Nlc9OKy5SyYoX9Rt4jFaLjzqJCwpgR4RVAEFSADsqQot0WKs5qNto0
362bfa
+
362bfa
+# Initialize (format) all disks (optional)
362bfa
+zerombr
362bfa
+
362bfa
+# The following partition layout scheme assumes disk of size 20GB or larger
362bfa
+# Modify size of partitions appropriately to reflect actual machine's hardware
362bfa
+#
362bfa
+# Remove Linux partitions from the system prior to creating new ones (optional)
362bfa
+# --linux	erase all Linux partitions
362bfa
+# --initlabel	initialize the disk label to the default based on the underlying architecture
362bfa
+clearpart --linux --initlabel
362bfa
+
362bfa
+# Create primary system partitions (required for installs)
362bfa
+part /boot --fstype=xfs --size=512
362bfa
+part pv.01 --grow --size=1
362bfa
+
362bfa
+# Create a Logical Volume Management (LVM) group (optional)
362bfa
+volgroup VolGroup --pesize=4096 pv.01
362bfa
+
362bfa
+# Create particular logical volumes (optional)
362bfa
+logvol / --fstype=xfs --name=LogVol06 --vgname=VolGroup --size=11264 --grow
362bfa
+# Ensure /tmp Located On Separate Partition
362bfa
+logvol /tmp --fstype=xfs --name=LogVol01 --vgname=VolGroup --size=1024 --fsoptions="nodev,noexec,nosuid"
362bfa
+logvol swap --name=lv_swap --vgname=VolGroup --size=2016
362bfa
+
362bfa
+
362bfa
+
362bfa
+# Harden installation with CIS profile
362bfa
+# For more details and configuration options see command %addon org_fedora_oscap in
362bfa
+# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/installation_guide/sect-kickstart-syntax#sect-kickstart-commands
362bfa
+%addon org_fedora_oscap
362bfa
+        content-type = scap-security-guide
362bfa
+        profile = xccdf_org.ssgproject.content_profile_cis_workstation_l1
362bfa
+%end
362bfa
+
362bfa
+# Packages selection (%packages section is required)
362bfa
+%packages
362bfa
+
362bfa
+# Require @Base
362bfa
+@Base
362bfa
+
362bfa
+%end # End of %packages section
362bfa
+
362bfa
+# Reboot after the installation is complete (optional)
362bfa
+# --eject	attempt to eject CD or DVD media before rebooting
362bfa
+reboot --eject
362bfa
diff --git a/products/rhel7/kickstart/ssg-rhel7-cis_workstation_l2-ks.cfg b/products/rhel7/kickstart/ssg-rhel7-cis_workstation_l2-ks.cfg
362bfa
new file mode 100644
362bfa
index 00000000000..b9bff5f390e
362bfa
--- /dev/null
362bfa
+++ b/products/rhel7/kickstart/ssg-rhel7-cis_workstation_l2-ks.cfg
362bfa
@@ -0,0 +1,147 @@
362bfa
+# SCAP Security Guide CIS profile (Level 2 - Workstation) kickstart for Red Hat Enterprise Linux 7 Server
362bfa
+# Version: 0.0.1
362bfa
+# Date: 2021-08-12
362bfa
+#
362bfa
+# Based on:
362bfa
+# https://pykickstart.readthedocs.io/en/latest/
362bfa
+# https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/sect-kickstart-syntax.html
362bfa
+
362bfa
+# Install a fresh new system (optional)
362bfa
+install
362bfa
+
362bfa
+# Specify installation method to use for installation
362bfa
+# To use a different one comment out the 'url' one below, update
362bfa
+# the selected choice with proper options & un-comment it
362bfa
+#
362bfa
+# Install from an installation tree on a remote server via FTP or HTTP:
362bfa
+# --url		the URL to install from
362bfa
+#
362bfa
+# Example:
362bfa
+#
362bfa
+# url --url=http://192.168.122.1/image
362bfa
+#
362bfa
+# Modify concrete URL in the above example appropriately to reflect the actual
362bfa
+# environment machine is to be installed in
362bfa
+#
362bfa
+# Other possible / supported installation methods:
362bfa
+# * install from the first CD-ROM/DVD drive on the system:
362bfa
+#
362bfa
+# cdrom
362bfa
+#
362bfa
+# * install from a directory of ISO images on a local drive:
362bfa
+#
362bfa
+# harddrive --partition=hdb2 --dir=/tmp/install-tree
362bfa
+#
362bfa
+# * install from provided NFS server:
362bfa
+#
362bfa
+# nfs --server=<hostname> --dir=<directory> [--opts=<nfs options>]
362bfa
+#
362bfa
+
362bfa
+# Set language to use during installation and the default language to use on the installed system (required)
362bfa
+lang en_US.UTF-8
362bfa
+
362bfa
+# Set system keyboard type / layout (required)
362bfa
+keyboard us
362bfa
+
362bfa
+# Configure network information for target system and activate network devices in the installer environment (optional)
362bfa
+# --onboot	enable device at a boot time
362bfa
+# --device	device to be activated and / or configured with the network command
362bfa
+# --bootproto	method to obtain networking configuration for device (default dhcp)
362bfa
+# --noipv6	disable IPv6 on this device
362bfa
+#
362bfa
+# NOTE: Usage of DHCP will fail CCE-27021-5 (DISA FSO RHEL-06-000292). To use static IP configuration,
362bfa
+#       "--bootproto=static" must be used. For example:
362bfa
+# network --bootproto=static --ip=10.0.2.15 --netmask=255.255.255.0 --gateway=10.0.2.254 --nameserver 192.168.2.1,192.168.3.1
362bfa
+#
362bfa
+network --onboot yes --device eth0 --bootproto dhcp --noipv6
362bfa
+
362bfa
+# Set the system's root password (required)
362bfa
+# Plaintext password is: server
362bfa
+# Refer to e.g. https://pykickstart.readthedocs.io/en/latest/commands.html#rootpw to see how to create
362bfa
+# encrypted password form for different plaintext password
362bfa
+rootpw --iscrypted $6$/0RYeeRdK70ynvYz$jH2ZN/80HM6DjndHMxfUF9KIibwipitvizzXDH1zW.fTjyD3RD3tkNdNUaND18B/XqfAUW3vy1uebkBybCuIm0
362bfa
+
362bfa
+# The selected profile will restrict root login
362bfa
+# Add a user that can login and escalate privileges
362bfa
+# Plaintext password is: admin123
362bfa
+user --name=admin --groups=wheel --password=$6$Ga6ZnIlytrWpuCzO$q0LqT1USHpahzUafQM9jyHCY9BiE5/ahXLNWUMiVQnFGblu0WWGZ1e6icTaCGO4GNgZNtspp1Let/qpM7FMVB0 --iscrypted
362bfa
+
362bfa
+# Configure firewall settings for the system (optional)
362bfa
+# --enabled	reject incoming connections that are not in response to outbound requests
362bfa
+# --ssh		allow sshd service through the firewall
362bfa
+firewall --enabled --ssh
362bfa
+
362bfa
+# Set up the authentication options for the system (required)
362bfa
+# --enableshadow	enable shadowed passwords by default
362bfa
+# --passalgo		hash / crypt algorithm for new passwords
362bfa
+# See the manual page for authconfig for a complete list of possible options.
362bfa
+authconfig --enableshadow --passalgo=sha512
362bfa
+
362bfa
+# State of SELinux on the installed system (optional)
362bfa
+# Defaults to enforcing
362bfa
+selinux --enforcing
362bfa
+
362bfa
+# Set the system time zone (required)
362bfa
+timezone --utc America/New_York
362bfa
+
362bfa
+# Specify how the bootloader should be installed (required)
362bfa
+# Plaintext password is: password
362bfa
+# Refer to e.g. https://pykickstart.readthedocs.io/en/latest/commands.html#rootpw to see how to create
362bfa
+# encrypted password form for different plaintext password
362bfa
+bootloader --location=mbr --append="crashkernel=auto rhgb quiet" --password=$6$zCPaBARiNlBYUAS7$40phthWpqvaPVz3QUeIK6n5qoazJDJD5Nlc9OKy5SyYoX9Rt4jFaLjzqJCwpgR4RVAEFSADsqQot0WKs5qNto0
362bfa
+
362bfa
+# Initialize (format) all disks (optional)
362bfa
+zerombr
362bfa
+
362bfa
+# The following partition layout scheme assumes disk of size 20GB or larger
362bfa
+# Modify size of partitions appropriately to reflect actual machine's hardware
362bfa
+#
362bfa
+# Remove Linux partitions from the system prior to creating new ones (optional)
362bfa
+# --linux	erase all Linux partitions
362bfa
+# --initlabel	initialize the disk label to the default based on the underlying architecture
362bfa
+clearpart --linux --initlabel
362bfa
+
362bfa
+# Create primary system partitions (required for installs)
362bfa
+part /boot --fstype=xfs --size=512
362bfa
+part pv.01 --grow --size=1
362bfa
+
362bfa
+# Create a Logical Volume Management (LVM) group (optional)
362bfa
+volgroup VolGroup --pesize=4096 pv.01
362bfa
+
362bfa
+# Create particular logical volumes (optional)
362bfa
+logvol / --fstype=xfs --name=LogVol06 --vgname=VolGroup --size=11264 --grow
362bfa
+# Ensure /home Located On Separate Partition
362bfa
+logvol /home --fstype=xfs --name=LogVol02 --vgname=VolGroup --size=1024 --fsoptions="nodev"
362bfa
+# Ensure /tmp Located On Separate Partition
362bfa
+logvol /tmp --fstype=xfs --name=LogVol01 --vgname=VolGroup --size=1024 --fsoptions="nodev,noexec,nosuid"
362bfa
+# Ensure /var/tmp Located On Separate Partition
362bfa
+logvol /var/tmp --fstype=xfs --name=LogVol7 --vgname=VolGroup --size=1024 --fsoptions="nodev,nosuid,noexec"
362bfa
+# Ensure /var Located On Separate Partition
362bfa
+logvol /var --fstype=xfs --name=LogVol03 --vgname=VolGroup --size=2048
362bfa
+# Ensure /var/log Located On Separate Partition
362bfa
+logvol /var/log --fstype=xfs --name=LogVol04 --vgname=VolGroup --size=1024
362bfa
+# Ensure /var/log/audit Located On Separate Partition
362bfa
+logvol /var/log/audit --fstype=xfs --name=LogVol05 --vgname=VolGroup --size=512
362bfa
+logvol swap --name=lv_swap --vgname=VolGroup --size=2016
362bfa
+
362bfa
+
362bfa
+
362bfa
+# Harden installation with CIS profile
362bfa
+# For more details and configuration options see command %addon org_fedora_oscap in
362bfa
+# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/installation_guide/sect-kickstart-syntax#sect-kickstart-commands
362bfa
+%addon org_fedora_oscap
362bfa
+        content-type = scap-security-guide
362bfa
+        profile = xccdf_org.ssgproject.content_profile_cis_workstation_l2
362bfa
+%end
362bfa
+
362bfa
+# Packages selection (%packages section is required)
362bfa
+%packages
362bfa
+
362bfa
+# Require @Base
362bfa
+@Base
362bfa
+
362bfa
+%end # End of %packages section
362bfa
+
362bfa
+# Reboot after the installation is complete (optional)
362bfa
+# --eject	attempt to eject CD or DVD media before rebooting
362bfa
+reboot --eject
362bfa
362bfa
From 92e84a2c1b302291aa8ffbc08ae3e4ffabd5dfe7 Mon Sep 17 00:00:00 2001
362bfa
From: Gabriel Becker <ggasparb@redhat.com>
362bfa
Date: Wed, 18 Aug 2021 14:24:34 +0200
362bfa
Subject: [PATCH 2/2] Fix typo in the CIS kickstart
362bfa
MIME-Version: 1.0
362bfa
Content-Type: text/plain; charset=UTF-8
362bfa
Content-Transfer-Encoding: 8bit
362bfa
362bfa
Co-authored-by: Jan Černý <jcerny@redhat.com>
362bfa
---
362bfa
 products/rhel7/kickstart/ssg-rhel7-cis-ks.cfg | 2 +-
362bfa
 1 file changed, 1 insertion(+), 1 deletion(-)
362bfa
362bfa
diff --git a/products/rhel7/kickstart/ssg-rhel7-cis-ks.cfg b/products/rhel7/kickstart/ssg-rhel7-cis-ks.cfg
362bfa
index 00edb9d536c..7062e2974ad 100644
362bfa
--- a/products/rhel7/kickstart/ssg-rhel7-cis-ks.cfg
362bfa
+++ b/products/rhel7/kickstart/ssg-rhel7-cis-ks.cfg
362bfa
@@ -1,4 +1,4 @@
362bfa
-# SCAP Security Guide CIS profile (Leve 2 - Server) kickstart for Red Hat Enterprise Linux 7 Server
362bfa
+# SCAP Security Guide CIS profile (Level 2 - Server) kickstart for Red Hat Enterprise Linux 7 Server
362bfa
 # Version: 0.0.1
362bfa
 # Date: 2021-08-12
362bfa
 #