-
Notifications
You must be signed in to change notification settings - Fork 0
/
c7.cfg
53 lines (41 loc) · 1.83 KB
/
c7.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
#version=EL7
text
# System authorization information
auth --enableshadow --passalgo=sha512
url --url={baserepo_url}/7/os/x86_64/
# Run the Setup Agent on first boot
firstboot --disable
ignoredisk --only-use=sda
# Keyboard layouts
# old format: keyboard be-latin1
# new format:
keyboard --vckeymap=be-latin1 --xlayouts='us'
# System language
lang en_GB.UTF-8
# Network information
network --activate --device link --hostname {vm_name}.{vm_dns_domain} --bootproto static --ip {vm_ip} --netmask {vm_netmask} --nameserver {vm_dns_server} --gateway {vm_gateway}
# Root password
rootpw --iscrypted $6$2qN9NGjFY52arN5v$QRB7gSG6CYsS5ADNfFOx6MEj8j8tENWXeRNzVyzAvf.sjHnW1/92e8GCxerW0tUUTrCUecYwQbjwb6ZEvftpy0
# System services
services --enabled="chronyd"
# System timezone
timezone Europe/London --isUtc --ntpservers=0.centos.pool.ntp.org,1.centos.pool.ntp.org,2.centos.pool.ntp.org
# System bootloader configuration
bootloader --location=mbr --boot-drive=sda
autopart --type=lvm
# Partition clearing information
clearpart --all --initlabel
#Reboot
reboot
%packages
@core
chrony
%end
%post
# setup root ssh authorized_keys
mkdir /root/.ssh
echo "ssh-dss AAAAB3NzaC1kc3MAAACBAIGGropb6yWgEkDLHPfRfWLrfX/6quYZxjmkFcd+L0BbpwRuUJV7gVXnOgLEp1xIUfelEMTOnp+H7ByJHjjg625SxwZ9bApzNXlc1GzEYbytYzvt9v2OAaGV/tt5HAma5wvj1vuD8X6s5T6aQv17eDTKhzhiWbfep1ueVfKCIeppAAAAFQD8RVdVgMItSimSiYWf38od2+1tiwAAAIAViNUsrM02S2R1XPZDb7pThjG27uoUxirsQm47bTSfH1IfHJJxpddeO9wxrrsojdCGWnWmRnZRgPIw/qtf9JBSf7M+5I4xSmb9ijUOzmYFKYa1IFWWEKBhPVwyVzxYyRUDEE/g0F9RWjmadHmOWVpwUIbCIq8ctCJjYPieQVXaeAAAAIAyqzVZ6rRdXM0pIRs/jr6BLl4k06X/Q8DRQCJft3JPLpOqx+D5VHHU0TDSXVvs/cIB6QMF4tCGVyjWysAKnoFiPlU7q0gKyapx9Q6vY+yWKllAvHBNYlgLslYA5EcGW63KPTVUauBlyFY+SnnT75KTloS8eui+Bj3clUUiXIjE5w== [email protected]" >> /root/.ssh/authorized_keys
chmod 700 /root/.ssh
chmod 600 /root/.ssh/*
restorecon -R -v /root/.ssh
%end