-
Notifications
You must be signed in to change notification settings - Fork 35
/
ks-fedora14.cfg
91 lines (79 loc) · 1.69 KB
/
ks-fedora14.cfg
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
88
89
90
# Build a basic Fedora 14 AMI
lang en_US.UTF-8
keyboard us
timezone US/Eastern
auth --useshadow --enablemd5
selinux --disabled
firewall --disabled
bootloader --timeout=1
network --bootproto=dhcp --device=eth0 --onboot=on
services --enabled=network
# Uncomment the next line
# to make the root password be password
# By default the root password is emptied
#rootpw password
#
# Define how large you want your rootfs to be
# NOTE: S3-backed AMIs have a limit of 10G
#
part / --size 512 --fstype ext3
#
# Repositories
repo --name=fedora --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-14&arch=$basearch
repo --name=updates --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f14&arch=$basearch
#
#
# Add all the packages after the base packages
#
%packages --excludedocs --nobase --instLangs=en
@core
system-config-securitylevel-tui
audit
pciutils
bash
coreutils
kernel-xen
grub
e2fsprogs
passwd
policycoreutils
chkconfig
rootfiles
yum
vim-minimal
acpid
openssh-clients
openssh-server
curl
#Allow for dhcp access
dhclient
iputils
%end
#
# Add custom post scripts after the base post.
#
%post
%end
# more ec2-ify
%post --erroronfail
# disable root password based login
cat >> /etc/ssh/sshd_config << EOF
PermitRootLogin without-password
UseDNS no
EOF
# set up ssh key fetching
cat >> /etc/rc.local << EOF
if [ ! -d /root/.ssh ]; then
mkdir -p /root/.ssh
chmod 700 /root/.ssh
fi
# Fetch public key using HTTP
KEY_FILE=\$(mktemp)
curl http://169.254.169.254/2009-04-04/meta-data/public-keys/0/openssh-key 2>/dev/null > \$KEY_FILE
if [ \$? -eq 0 ]; then
cat \$KEY_FILE >> /root/.ssh/authorized_keys
chmod 600 /root/.ssh/authorized_keys
fi
rm -f \$KEY_FILE
EOF
%end