Skip to content

Instantly share code, notes, and snippets.

@blackknight36 blackknight36/ks.txt

Created Aug 23, 2019
Embed
What would you like to do?
# System authorization information
auth --enableshadow --passalgo=sha512
firewall --disabled
firstboot --disable
ignoredisk --only-use=sda
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8
# System timezone
timezone --utc America/Detroit
selinux --enforcing
#CentOS 7 test - MW
url --url http://packages.example.com/pub/centos/7.6.1810/os/x86_64/
skipx
# Use dhcp
network --bootproto=dhcp
# Root password
rootpw --iscrypted <hash>
# System services
services --enabled="chronyd" --disabled=firewalld
# System timezone
timezone America/Detroit --isUtc
# Clear the master boot record
zerombr
# Partition clearing information
clearpart --all --initlabel --drives=sda
#partitions
#part biosboot --fstype=biosboot --size=1
part /boot --fstype=xfs --size=500 --ondisk=sda
part pv.1 --size=1 --grow --ondisk=sda
volgroup vg_system pv.1
logvol / --fstype=xfs --name=lv_root --vgname=vg_system --size=10240 #10GB
logvol swap --fstype=swap --name=lv_swap --vgname=vg_system --size=2048 #2GB
logvol /storage --fstype=xfs --name=lv_storage --vgname=vg_data --size=1 --grow #8GB
# System bootloader configuration
# usbcore.autosuspend=-1: disables low power mode, which fixes issues with the iDRAC remote console losing its keyboard/mouse
# elevator=deadline: changes the I/O scheduler to the 'noop' or 'deadline' scheduler, where 'cfq' is default and performs poorly for server/database applications
bootloader --location mbr --append "usbcore.autosuspend=-1 elevator=deadline" --boot-drive sda
# Additional repos
repo --name "foo" --baseurl http://packages.example.com/pub/epel/foo/released/7/x86_64/
repo --name "local-fedora" --baseurl http://packages.example.com/pub/centos/7/os/x86_64
repo --name "local-updates" --baseurl http://packages.example.com/pub/centos/7/updates/x86_64/
# EPEL repo
repo --name=epel --baseurl=http://dl.fedoraproject.org/pub/epel/7/x86_64/
# Puppet repo
repo --name "puppetlabs-pc1" --baseurl http://packages.example.com/pub/puppet/el/7/PC1/x86_64/
%post --interpreter=/bin/bash
systemctl disable NetworkManager.service
systemctl enable network.service
systemctl stop NetworkManager.service
systemctl stop network.service
systemctl start network.service
%end
%packages
@core
-firewalld
-firstboot
-NetworkManager
chrony
compat-libstdc++-33.i686
glibc.i686
iptables-services
ntpdate
puppet-agent
tar
tmux
wget
%end
reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.