Last active
February 24, 2023 07:26
-
-
Save dmi3mis/3d34902b717c8a3de790bceb0c0e2d5f to your computer and use it in GitHub Desktop.
test kickstart file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#version=CentOS 8 Stream | |
# Use text install | |
text | |
skipx | |
%packages | |
@^virtualization-host-environment | |
@remote-system-management | |
@virtualization-platform | |
%end | |
url --mirrorlist="http://mirrorlist.centos.org/?release=$stream&arch=$basearch&repo=BaseOS&infra=$infra" | |
repo --name="AppStream" --mirrorlist=http://mirrorlist.centos.org/?release=$stream&arch=$basearch&repo=AppStream&infra=$infra | |
# Keyboard layouts | |
keyboard --xlayouts='us' | |
# System language | |
lang en_US.UTF-8 | |
# Network information | |
network --bootproto=dhcp --device=enp3s0 --ipv6=auto --activate | |
network --hostname=host.ovirt.test | |
# Run the Setup Agent on first boot | |
firstboot --enable | |
ignoredisk --only-use=sda | |
# Partition clearing information | |
clearpart --none --initlabel | |
# Disk partitioning information | |
part /home --fstype="xfs" --ondisk=sda --size=10240 | |
part / --fstype="xfs" --ondisk=sda --size=1880420 | |
part /boot --fstype="xfs" --ondisk=sda --size=1024 | |
part swap --fstype="swap" --ondisk=sda --size=16043 | |
# System timezone | |
timezone Europe/Moscow --isUtc | |
# Root password | |
rootpw --lock | |
user --groups=wheel --name=user --gecos="user" --shell=/bin/bash --plaintext --password 'pass123' | |
%addon com_redhat_kdump --disable --reserve-mb='auto' | |
%end | |
%anaconda | |
pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok | |
pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty | |
%end | |
%post | |
set -x | |
# allow user to sudo any command with root without password confirmation | |
echo 'user ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/user | |
# add my ssh keys to allow me remote ssh to this host | |
mkdir -p /root/.ssh | |
curl https://github.com/dmi3mis.keys > /root/.ssh/authorized_keys | |
mkdir -p /home/user/.ssh | |
curl https://github.com/dmi3mis.keys > /home/user/.ssh/authorized_keys | |
# install latest ansible and ansible-core from epel rpms | |
dnf install -y epel-release bind nfs-utils | |
dnf install -y ansible ansible-core rhel-system-roles | |
set +x | |
%end | |
reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment