Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
install
# Use network installation
url --url="{{ kickstart_server }}/6/os/x86_64"
# Root password "vagrant"
rootpw --iscrypted $1$AhuPDILr$dDMPkB.oPma.Y0G0SnpdH0
# add a vagrant user with password "vagrant"
user --name=vagrant --password=$1$z/0vnFRa$3tWM3pKkniA7SuYGpX/T4/ --iscrypted --uid=1000
auth --useshadow --passalgo=sha512
# Use text mode install
text
keyboard uk
lang en_GB
selinux --permissive
skipx
logging --level=info
reboot
timezone Europe/London
network --bootproto=dhcp --device=eth0 --onboot=on --hostname=initial6
firewall --disabled
bootloader --location=mbr
zerombr
clearpart --all --initlabel
part /boot --asprimary --fstype="ext4" --size=500
part / --asprimary --fstype="ext4" --grow --size=1
part swap --asprimary --fstype="swap" --size=64
%packages
@base
@core
bind-libs
bind-utils
git
kernel-devel
libselinux-python
ntp
openssh-clients
openssh-server
redhat-lsb
rsync
rsyslog
sudo
sysstat
telnet
vim-enhanced
virt-what
-OpenIPMI
-OpenIPMI-libs
-apmd
-aspell
-aspell-en
-autofs
-bluez-bluefw
-bluez-hcidump
-bluez-libs
-bluez-utils
-dapl
-desktop-file-utils
-diskdumputils
-dmraid
-dos2unix
-dosfstools
-dump
-eject
-finger
-ftp
-gpm
-htmlview
-ibmasm
-indexhtml
-ipsec-tools
-irda-utils
-isdn4k-utils
-jpackage-utils
-kernel-smp
-krb5-workstation
-lftp
-libmthca
-librdmacm
-libsdp
-libwvstreams
-lksctp-tools
-m4
-mailcap
-mailx
-minicom
-mt
-mt-st
-mtr
-nano
-nfs
-nfs-utils-lib
-nscd
-nss_ldap
-numactl
-pam_ccreds
-pam_krb5
-pam_passwdqc
-pam_smb
-parted
-pcmcia-cs
-pdksh
-pinfo
-ppp
-procmail
-rdist
-redhat-menus
-rhpl
-rmt
-rp-pppoe
-rsh
-sendmail
-setarch
-specspo
-sysreport
-talk
-tcsh
-unix2dos
-up2date
-vconfig
-wireless-tools
-wvdial
-yp-tools
-ypbind
%end
%pre
ntpdate ntp.linx.net
hwclock --systohc
%end
%post --logfile /root/ks-post.log
# pop the IP and MAC address into /etc/issue – useful visibility for initial log on
ip=$(/sbin/ifconfig eth0 | /usr/bin/perl -ne 'print $1 if /addr:( (\d{1,3}\.){3} \d{1,3} )/x')
mac=$(/sbin/ifconfig eth0 | /usr/bin/perl -ne 'print $1 if /HWaddr \s ((?:\w{2} :){5} \w{2})/x')
echo "IP: ${ip} MAC: ${mac}" >> /etc/issue
# this used to be for building images for vagrant, and frankly it's now muscle memory. You could change or even ditch this user, of course
user=vagrant
mkdir -p /home/${user}/.ssh
cat > /home/${user}/.ssh/authorized_keys <<'EOF'
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key
EOF
chown -R ${user}:${user} /home/${user}/.ssh
chmod 700 /home/${user}/.ssh
cat > /etc/sudoers.d/${user} <<EOF
${user} ALL=(ALL) NOPASSWD: ALL
EOF
chmod 440 /etc/sudoers.d/${user}
# For Ansible pipelining+sudo support
perl -pi -e 's/(Defaults \s+ requiretty)/#$1/x' /etc/sudoers
# patch
%end