#version=RHEL7 # System authorization information auth --enableshadow --passalgo=sha512 # Use network installation url --url="http://mirror.internode.on.net/pub/centos/7/os/x86_64/" cmdline # Run the Setup Agent on first boot firstboot --enable ignoredisk --only-use=vda # Keyboard layouts keyboard --vckeymap=us --xlayouts='us' # System language lang en_AU.UTF-8 logging --host=logs3.papertrailapp.com --port=12449 --level=debug # Network information network --bootproto=dhcp --device=eth0 --ipv6=auto --activate --hostname=install firewall --enabled #Root password rootpw --lock # System services services --enabled="chronyd" # System timezone timezone Etc/UTC --isUtc user --groups=wheel --name=swilson --password=$6$7KTc73jFyLeD$X3EKRmHlKtKLs7zbje1ZPq3AviS9vhVGkk5z4BGMYeZQx1j1/Ii58fQeOhm0tK/gyhgDsu/rPl7dZqsNRTZiN0 --iscrypted # System bootloader configuration bootloader --location=mbr --boot-drive=vda autopart --type=lvm # Partition clearing information clearpart --none --initlabel %packages @core firewalld chrony %end %post --log=/var/log/post_install.log set -x exec < /dev/tty3 > /dev/tty3 chvt 3 echo echo "################################" echo "# Running Post Configuration #" echo "################################" ( mkdir /home/swilson/.ssh chmod 0700 /home/swilson/.ssh echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDW6Kg3NDhIsIGZ61n+WGFwadCJyGozPtrSaSzqyqif2MAmiZmSPgdmTHwLUs+m6fvHTND7Un2Fp/fqCgKJXQbAgL07dNCTGUiuqepYXyI42LiYX/O6q1KtmNuF3OePC9SkiWU0odvSCNq0g6Es8+BRdARUeAWcSloT/6FSG+aEbJX3Q4LR8vY78LoUV7+a5apavTLs4xTGXpokCv8U7LgIOoOJGlaCiamDI9S9p++9jFcpoYmltKtCuXSe0JN7C93pdJJ9SZbA7Uq+s8sA1mDlQHCikHPWBgdTYZQk6boCn36Nyeyx5guJ4qYN7fXTpOZajT2sZX2/qXa4lOQ4XFwp" >> /home/swilson/.ssh/authorized_keys chown swilson:swilson -Rv /home/swilson/.ssh sed -i 's/Defaults requiretty/Defaults !requiretty/' /etc/sudoers sed -i 's/^%wheel.*/%wheel ALL=(ALL) NOPASSWD: ALL/' /etc/sudoers touch /etc/rc.d/rc.local chmod +x /etc/rc.d/rc.local echo '#!/usr/bin/env bash' >> /etc/rc.d/rc.local echo 'firewall-cmd --permanent --zone=public --remove-service=ssh' >> /etc/rc.d/rc.local echo "firewall-cmd --permanent --zone=public --add-rich-rule='rule family=ipv4 source address=59.167.161.64 accept'" >> /etc/rc.d/rc.local echo "firewall-cmd --permanent --zone=public --add-rich-rule='rule family=ipv6 source address=2001:44b8:31f0:2900::/64 accept'" >> /etc/rc.d/rc.local ) 2>&1 | /usr/bin/tee /var/log/post_install_output.log chvt 1 %end %addon com_redhat_kdump --disable --reserve-mb='auto' %end