You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
1.8 KiB

2 years ago
install
cdrom
lang en_US.UTF-8
keyboard us
network --bootproto=dhcp --noipv6 --onboot=on --device=eth0
rootpw --plaintext vagrant
firewall --disabled
selinux --permissive
timezone UTC
unsupported_hardware
bootloader --timeout=1 --location=mbr --append="net.ifnames=0 biosdevname=0"
text
skipx
zerombr
clearpart --all --initlabel
autopart --nohome --nolvm
auth --enableshadow --passalgo=sha512 --kickstart
firstboot --disabled
reboot --eject
user --name=vagrant --plaintext --password vagrant
%packages --nobase --ignoremissing --excludedocs --instLangs=en_US.utf8
# vagrant needs this to copy initial files via scp
openssh-clients
sudo
selinux-policy-devel
wget
nfs-utils
net-tools
tar
bzip2
deltarpm
rsync
-fprintd-pam
-intltool
# unnecessary firmware
-*firmware
-microcode_ctl
%end
%post
# sudo
echo 'Defaults:vagrant !requiretty' > /etc/sudoers.d/vagrant
echo '%vagrant ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers.d/vagrant
chmod 440 /etc/sudoers.d/vagrant
# Enable hyper-v daemons only if using hyper-v virtualization
if [ $(virt-what) == "hyperv" ]; then
yum -y install hyperv-daemons cifs-utils
systemctl enable hypervvssd
systemctl enable hypervkvpd
fi
# Since we disable consistent network naming, we need to make sure the eth0
# configuration file is in place so it will come up.
# Delete other network configuration first because RHEL/C7 networking will not
# restart successfully if there are configuration files for devices that do not
# exist.
rm -f /etc/sysconfig/network-scripts/ifcfg-e*
cat > /etc/sysconfig/network-scripts/ifcfg-eth0 << _EOF_
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=eth0
DEVICE=eth0
ONBOOT=yes
_EOF_
%end