This repository has been archived by the owner on Feb 20, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathks.cfg
104 lines (72 loc) · 2.57 KB
/
ks.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
#version=DEVEL
# System authorization information
auth --enableshadow --passalgo=sha512
############### Basic Settings ###############
# Use CDROM installation media
cdrom
# Use text install
graphical
# Run the Setup Agent on first boot
firstboot --disable
# Reboot after completion of installing
poweroff --eject
############### System Settings ###############
# Keyboard layouts
keyboard --vckeymap=jp --xlayouts='jp'
# System language
lang ja_JP.UTF-8
# System timezone
timezone Asia/Tokyo --utc
# Network information
network --bootproto=dhcp --device=enp0s25 --onboot=on --noipv6 --activate
network --hostname=dockerhost
# Firewall
firewall --disabled
# SELinux
selinux --permissive
# Root password
rootpw --plaintext P@ssw0rd
# System services
services --enabled="chronyd"
# Unset X
skipx
############### Disk Partitioning Settings ###############
ignoredisk --only-use=sda
# Partition clearing information
zerombr
clearpart --all --drives=sda
# System bootloader configuration
bootloader --location=mbr --boot-drive=sda
# Disk partitioning information
part pv.1 --fstype="lvmpv" --ondisk=sda --size=1 --grow
part /boot --fstype="xfs" --ondisk=sda --size=500
# LVM information
volgroup dockerhost pv.1 --pesize=4096
logvol swap --fstype="swap" --size=8192 --vgname=dockerhost --name=swap
logvol /var/lib/docker --fstype="xfs" --size=1 --grow --vgname=dockerhost --name=docker
logvol / --fstype="xfs" --size=30000 --vgname=dockerhost --name=root
############### Install Packages Settings ###############
# Install packages
%packages --excludedocs
@^minimal
%end
%addon com_redhat_kdump --disable
%end
%anaconda
pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty
pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty
%end
%post
# Disabled to suspend
echo "HandleSuspendKey=ignore" >> /etc/systemd/logind.conf
echo "HandleHibernateKey=ignore" >> /etc/systemd/logind.conf
echo "HandleLidSwitch=ignore" >> /etc/systemd/logind.conf
# Public key authentication
mkdir -m 700 /root/.ssh
cat <<@ > /root/.ssh/authorized_keys
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAsYrYR83GWpndoiJpUgxYre8E8VOW8PPJlSqupB0oVIqedmzMrBYyHZ5vJ6BN40zzrbwPANsZgnFesf8c1igmU26MPY3trJNvjFOkfJ04Jpl8yQQTA3v5sqRTZDIsdk3+VtIX0bw6GwqVLM9LJu5gALjTXNPvaFXhP0hRWhz9r146tGYOqLmipZ3/x3BOMN20newjns+ODIdWCIuq33CoWly4JzLL9Iu/wqLpa9vqbmffYCeSGOu8tJQMsF887L95aQ1DE45UKOyAdcqtnxl4UqCxUejft/xSyQzagwZfce7evXPT0S2jN9iug+LkQ7jzOu1x2EeZSk0Tu9rKQqYd chupaaaaaaan@chupaaaaaaan
@
chmod 600 /root/.ssh/authorized_keys
# package install
yum -y install rsync
%end