-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsimple.cfg
140 lines (112 loc) · 2.29 KB
/
simple.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
##version=CENTOS7
# Install from an installation tree on a remote server.
# Required when using a minimal ISO image
url --url=http://mirror.centos.org/centos/7/os/x86_64/
text
# Add additional repository
repo --name="EPEL" --baseurl=http://dl.fedoraproject.org/pub/epel/7/x86_64/
# System keyboard
keyboard --vckeymap=sg --xlayouts='de'
# System language
lang en_US.UTF-8
# Setup network interfaces via DHCP
network --device=enp1s0 --bootproto=dhcp --activate
network --device=enp2s0 --bootproto=dhcp --activate
network --device=enp3s0 --bootproto=dhcp --activate
network --device=enp4s0 --bootproto=static --ip=10.0.0.1 --netmask=255.255.255.0 --activate
network --hostname=simple
# Set root password here (required by KS)
# python3 -c 'import crypt; print(crypt.crypt("Admin123", "$6$SomeSalt"))'
#rootpw --iscrypted $6$SomeSalt$r.BIAr5XooMu...
rootpw --plaintext 12345678
firewall --enabled --service=ssh
firstboot --disabled
# SELinux configuration
selinux --enforcing
# System services
services --enabled="chronyd"
services --enabled="sshd"
services --disabled="avahi-daemon"
# Installation logging level
logging --level=debug
# System timezone
timezone Europe/Berlin
# Clear the Master Boot Record
zerombr
# Automatically create partitions, as LVM
ignoredisk --only-use=sda
autopart --type=lvm
# Partition clearing information
clearpart --all --initlabel --drives=sda
# Reboot after installation
reboot
%packages
@core
acpid
bannergrab
bridge-utils
chrony
ciphertest
clevis-dracut
curl
dnsenum
fping
halberd
hping3
httping
iputils
lbd
man
masscan
minicom
mtr
netsniff-ng
net-snmp-utils
net-tools
ngrep
nikto
nmap
ntp
ntpdate
nuttcp
onesixtyone
openldap-clients
openssh-clients
scapy
screen
snmpcheck
swaks
telnet
testssl
tlssled
tmux
traceroute
unzip
wget
wireshark
yersinia
zip
%end
%addon com_redhat_kdump --disable --reserve-mb='auto'
%end
%post --log=/var/log/ks.post.log
#!/bin/bash
## Build vars used for motd
BUILD_DATE=`date '+%Y-%m-%d, %H:%m:%S'`
OS="CentOS 7.6-1810"
# Create MOTD
echo "Creating /etc/motd"
mv /etc/motd /etc/motd-backup
cat << MOTD > /etc/motd
$OS
Build date: $BUILD_DATE
MOTD
# Update all packages
echo "Updating packages ..."
/usr/bin/yum clean all
/usr/bin/yum update -y
# Clean up all yum caches
echo "Cleaning up yum caches"
/usr/bin/yum clean all
echo "End of Kickstart"
%end