Created
September 22, 2015 20:40
-
-
Save drboyer/24b255b2f5a0e008abae to your computer and use it in GitHub Desktop.
Extended from https://github.com/jameswthorne/kickstart-profiles/blob/master/centos-6-x86_64-vagrant-box.txt, this also ejects the CD and reboots the system
This file contains 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
install | |
text | |
cdrom | |
lang en_US.UTF-8 | |
keyboard us | |
network --onboot yes --bootproto dhcp --noipv6 | |
timezone --utc America/Chicago | |
zerombr | |
clearpart --all --initlabel | |
bootloader --location=mbr --append="crashkernel=auto rhgb quiet" | |
part /boot --fstype=ext3 --size=256 | |
part pv.01 --size=1024 --grow | |
volgroup vg_root pv.01 | |
logvol swap --fstype swap --name=lv_swap --vgname=vg_root --size=1024 | |
logvol / --fstype=ext4 --name=lv_root --vgname=vg_root --size=1024 --grow | |
authconfig --enableshadow --passalgo=sha512 | |
# rootpw is vagrant | |
rootpw --iscrypted $1$dUDXSoA9$/bEOTiK9rmsVgccsYir8W0 | |
firewall --disabled | |
selinux --permissive | |
skipx | |
shutdown | |
%packages | |
@core | |
openssh-server | |
openssh-clients | |
wget | |
curl | |
git | |
man | |
vim | |
ntp | |
%end | |
%post | |
chkconfig ntpd on | |
service ntpd stop | |
ntpdate time.nist.gov | |
service ntpd start | |
chkconfig sshd on | |
chkconfig iptables off | |
chkconfig ip6tables off | |
useradd vagrant | |
mkdir -m 0700 -p /home/vagrant/.ssh | |
curl https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub >> /home/vagrant/.ssh/authorized_keys | |
chmod 600 /home/vagrant/.ssh/authorized_keys | |
chown -R vagrant:vagrant /home/vagrant/.ssh | |
sed -i 's/^\(Defaults.*requiretty\)/#\1/' /etc/sudoers | |
echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers | |
cat << EOF1 > /etc/sysconfig/network-scripts/ifcfg-eth0 | |
DEVICE=eth0 | |
TYPE=Ethernet | |
ONBOOT=yes | |
NM_CONTROLLED=no | |
BOOTPROTO=dhcp | |
EOF1 | |
rm -f /etc/udev/rules.d/70-persistent-net.rules | |
yum clean all | |
rm -rf /tmp/* | |
rm -f /var/log/wtmp /var/log/btmp | |
history -c | |
eject /dev/cdrom | |
shutdown -r 0 | |
%end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment