Skip to content

Instantly share code, notes, and snippets.

@cfluegel
Created November 22, 2020 16:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cfluegel/030f014c724329ae52fe20505b632403 to your computer and use it in GitHub Desktop.
Save cfluegel/030f014c724329ae52fe20505b632403 to your computer and use it in GitHub Desktop.
Kickstart test file. It can be used as a starter for a proxmox guest installation. The idea is to use ansible for all further configuration.
#version=CENTOS7
auth --enableshadow --passalgo=sha512
text
firstboot --enable
eula --agreed
reboot --eject
# System Language Settings
keyboard --vckeymap=de-nodeadkeys --xlayout='de (nodeadkeys)'
lang de_DE.UTF-8
timezone Europe/Berlin --isUtc
# Network
network --bootproto=dhcp --device=eth0 --noipv6 --activate
network --hostname=centos7-defaultks.fritz.box
url --url="http://centos.mirror.iphh.net/CentOS/7/os/x86_64"
repo --name=epel --baseurl="http://ftp.fau.de/epel/7/x86_64/"
repo --name=extras --baseurl="http://centos.mirror.iphh.net/CentOS/7/extras/x86_64/"
# Bootloader
bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=sda
# Disk partitioning
ignoredisk --only-use=sda
clearpart --drives=sda --all
part /boot --fstype="xfs" --ondisk=sda --size=1024
part pv.1 --fstype="lvmpv" --ondisk=sda --size=1 --grow
volgroup system --pesize=4096 pv.1
logvol / --fstype="xfs" --size=10240 --name=root --vgname=system
logvol swap --fstype="swap" --size=2048 --name=swap --vgname=system
logvol /tmp --fstype="xfs" --size=4096 --name=tmp --vgname=system
logvol /var --fstype="xfs" --size=4096 --name=var --vgname=system
# Users
# python way crypt.crypt('password', '$6$' + base64.b64encode(os.urandom(6)))
# python3 crypt.crypt("password", crypt.mksalt())
rootpw --iscrypted <redacted>
user --groups=wheel --name=ansible --password=$6$jCWnBkYaWpQ8CUra$6h1zS845EHGU1Ytg1Hhi9f40hLCd68hpnCXbnAXlnanQoNwwzZIST3Ue3liiP1Vpao9wzwsS5Nsx1a7b1i8fK. --iscrypted --gecos="ansible"
# SElinux
selinux --permissive
# Services
services --enabled="chronyd"
# Packages
%packages
@^minimal
@core
@system-admin-tools
chrony
kexec-tools
vim-common
htop
python3
python3-virtualenv
python3-pip
%end
# Packages END
# Allow Ansible to use sudo without password
%post
echo "ansible ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/ansible-no-passwd
%end
# Addon Configurations
%addon com_redhat_kdump --enable --reserve-mb='auto'
%end
# Anaconda Policy
%anaconda
pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty
pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok
pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty
%end
# Anaconda Policy END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment