lang en_US
keyboard us
timezone Etc/UTC --isUtc
rootpw $1$vG3NcBW+$ueET7clDOamKd4mIlucNo1 --iscrypted
#platform x86, AMD64, or Intel EM64T
reboot
cdrom
bootloader --location=mbr --append="rhgb quiet crashkernel=auto"
zerombr
clearpart --all --initlabel
autopart
auth --passalgo=sha512 --useshadow
selinux --enforcing
firewall --enabled --http --ssh
skipx
firstboot --disable
%packages
@base
%end

# RedHat 7.x kickstart file - ks7.cfg
#
# For more information on kickstart syntax and commands, refer to the
# RedHat Installation Guide:
# https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/sect-kickstart-syntax.html
#

lang en_US.UTF-8
keyboard us
timezone Etc/UTC --isUtc
rootpw vagrant

# Optional settings
#platform x86, AMD64, or Intel EM64T
install
cdrom
user --name=vagrant --plaintext --password vagrant
bootloader --location=mbr --append="rhgb quiet crashkernel=auto"
zerombr
clearpart --all --initlabel
autopart
auth --passalgo=sha512 --useshadow
selinux --permissive
firewall --disabled
skipx
firstboot --disable
reboot

%packages --nobase --ignoremissing --excludedocs
# vagrant needs this to copy initial files via scp
openssh-clients
# Prerequisites for installing VMware Tools or VirtualBox guest additions.
# Put in kickstart to ensure first version installed is from install disk,
# not latest from a mirror.
kernel-headers
kernel-devel
gcc
make
perl
curl
wget
bzip2
dkms
patch
net-tools
git
# Other stuff
sudo
nfs-utils
-fprintd-pam
-intltool

# unnecessary firmware
-aic94xx-firmware
-atmel-firmware
-b43-openfwwf
-bfa-firmware
-ipw*-firmware
-irqbalance
-ivtv-firmware
-iwl*-firmware
-libertas-usb8388-firmware
-ql*-firmware
-rt61pci-firmware
-rt73usb-firmware
-xorg-x11-drv-ati-firmware
-zd1211-firmware
%end

%post
# configure vagrant user in sudoers
echo "%vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant
chmod 0440 /etc/sudoers.d/vagrant
cp /etc/sudoers /etc/sudoers.orig
sed -i "s/^\(.*requiretty\)$/#\1/" /etc/sudoers
# keep proxy settings through sudo
echo 'Defaults env_keep += "HTTP_PROXY HTTPS_PROXY FTP_PROXY RSYNC_PROXY NO_PROXY"' >> /etc/sudoers
%end

Update kickstart file, add vagrant user, packages, and sudo config.
Update kickstart file, add vagrant user, packages, and sudo config.
