forked from jameswthorne/kickstart-profiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfedora-20-x86_64-vagrant-box.txt
87 lines (61 loc) · 1.97 KB
/
fedora-20-x86_64-vagrant-box.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
install
text
url --url http://mirrors.kernel.org/fedora/releases/20/Everything/x86_64/os/
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
systemctl enable ntpd
systemctl stop ntpd
ntpdate time.nist.gov
systemctl start ntpd
systemctl enable sshd
systemctl disable firewalld
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
rm -f /etc/udev/rules.d/70-persistent-net.rules
# Fedora 15 and newer names network devices based on physical locations
# in the server. Depending on the network device driver, the name could
# be different on each server. The following three lines will find the
# primary network interface and remove the hardcoded UUID and HWADDR
# values from the primary network interface configuration file.
PRIMARY_INTERFACE=$(ip route list match 0.0.0.0 | awk 'NR==1 {print $5}')
sed -i '/UUID/d' /etc/sysconfig/network-scripts/ifcfg-$PRIMARY_INTERFACE
sed -i '/HWADDR/d' /etc/sysconfig/network-scripts/ifcfg-$PRIMARY_INTERFACE
yum clean all
rm -rf /tmp/*
rm -f /var/log/wtmp /var/log/btmp
history -c
%end