Skip to content

Instantly share code, notes, and snippets.

@kondor6c
Last active April 23, 2021 19:54
Show Gist options
  • Save kondor6c/d16834b08be95454fc993292a7bf3f7d to your computer and use it in GitHub Desktop.
Save kondor6c/d16834b08be95454fc993292a7bf3f7d to your computer and use it in GitHub Desktop.
#version=DEVEL
# System authorization information
auth --enableshadow --passalgo=sha512
install
text
skipx
firstboot --disable
keyboard --vckeymap=us --xlayouts='us'
lang en_US.UTF-8
timezone America/New_York --isUtc
ignoredisk --only-use=vda
#url --mirrorlist="https://mirrors.fedoraproject.org/mirrorlist?repo=fedora-32&arch=x86_64"
repo --name=fedora --baseurl=http://mirror.math.princeton.edu/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/ --proxy 10.1.1.1:3128
repo --name=rpmfusion-free --baseurl=http://mirror.math.princeton.edu/pub/rpmfusion/free/fedora/releases/$releasever/Everything/$basearch/os/ --proxy 10.1.1.1:3128
repo --name=rpmfusion-free-updates --baseurl=http://mirror.math.princeton.edu/pub/rpmfusion/free/fedora/updates/$releasever/$basearch/ --proxy 10.1.1.1:3128
repo --name=updates --baseurl=http://mirror.math.princeton.edu/pub/fedora/linux/updates/$releasever/Everything/$basearch --install --proxy 10.1.1.1:3128
# Network information
network --onboot=yes --bootproto=dhcp --activate --hostname=template
# Root pasword
rootpw --plaintext server
# System services
services --enabled="sshd"
# System timezone
user --groups=wheel --name=autobot --plaintext --password=server --gecos="generic automated user"
sshkey --username=autobot "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBQiZuIUuxHiKXL93NdxDgR+pvDjLzmee8GwxmyEtBdI kondor6c"
user --groups=wheel --name=kondor6c --plaintext --password=server --gecos="user"
sshkey --username=autobot "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFG6EZgIelmW2W6gqSZgiZ4iRRsJ6757ksyQ3gn/k24U kondor6c"
# System bootloader configuration
bootloader --location=mbr --boot-drive=vda
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --initlabel --linux --list=vda
logging --level=info
# Disk partitioning information, NOTE: btrfs is NOT supported in RHEL/CentOS 8
part /boot --fstype="xfs" --label=boot --maxsize=750 --size=300
part btrfs.863 --fstype="btrfs" --fsoptions='noatime' --ondisk=vda --maxsize=50000 --grow
part swap --maxsize=750 --label="swap" --fstype="swap"
btrfs / btrfs.863 --label="rootfs"
btrfs /usr --subvol --name=usr rootfs
btrfs /var/log --subvol --name=log rootfs
btrfs /home --subvol --name=home rootfs
btrfs /var --subvol --name=var rootfs
btrfs /opt --subvol --name=opt rootfs
%packages
@headless-management --nodefaults
tmux
vim-enhanced
ansible
cloud-init
openssh-clients
openssh-server
python3-libsemanage
%end
reboot
%post
echo 'autobot ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
echo 'kondor6c ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
echo 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIE2ed/G6XDvg92DNGwxFm3u19+mEckb/nRXOIwUssmmQ autobot@ryzen17k' >> /home/autobot/.ssh/authorized_keys
%end
%anaconda
pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --emptyok
pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok
pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --emptyok
%end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment