Created
April 3, 2018 12:26
-
-
Save sshnaidm/aeb796bad0d9c498ff6ea1731692688c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#version=RHEL7 | |
# System authorization information | |
auth --enableshadow --passalgo=sha512 --enablefingerprint | |
# Install OS instead of upgrade | |
install | |
# Reboot after installation | |
shutdown | |
# Use network installation - choose your mirror | |
url --url='http://mirror.isoc.org.il/pub/centos/7/os/x86_64/' | |
# Use text mode install | |
text | |
# Firewall configuration | |
firewall --disabled | |
firstboot --disable | |
ignoredisk --only-use=vda | |
# Keyboard layouts | |
# old format: keyboard us | |
# new format: | |
keyboard --vckeymap=us --xlayouts='us' | |
# System language | |
lang en_US.UTF-8 | |
# Network information | |
network --bootproto=dhcp --device=eth0 --ipv6=auto --activate | |
repo --name="latest" --baseurl=http://mirror.isoc.org.il/pub/centos/7/os/ | |
repo --name="plus" --baseurl=http://mirror.isoc.org.il/pub/centos/7/centosplus/x86_64/ | |
repo --name="extras" --baseurl=http://mirror.isoc.org.il/pub/centos/7/extras/x86_64/ | |
repo --name="updates" --baseurl=http://mirror.isoc.org.il/pub/centos/7/updates/x86_64/ | |
repo --name="kvm-common" --baseurl=http://mirror.isoc.org.il/pub/centos/7/virt/x86_64/kvm-common/ | |
# Root password | |
rootpw --iscrypted 'here is your encrypted password' | |
# Do not configure the X Window System | |
skipx | |
# System timezone - choose your one | |
timezone Asia/Jerusalem --isUtc --ntpservers=ns1.eng.tlv.redhat.com,s02.tlv.redhat.com | |
# System bootloader configuration | |
bootloader --append="rhgb quiet crashkernel=auto" --location=mbr --boot-drive=vda | |
# Partition clearing information | |
clearpart --all --initlabel | |
# Disk partitioning information | |
part /boot --fstype="ext4" --size=500 | |
part / --fstype="ext4" --grow --maxsize=100000 --size=1024 | |
part /home --fstype="ext4" --grow --maxsize=50000 --size=1024 | |
part swap --fstype="swap" --grow --maxsize=4000 --size=1024 | |
%post | |
mkdir /root/.ssh | |
cat << xxEOFxx >> /root/.ssh/authorized_keys | |
################# < here are your keys > | |
xxEOFxx | |
echo 'options kvm-intel nested=y' >> /etc/modprobe.d/dist.conf | |
/usr/sbin/useradd zuul -p 'here is your encrypted password' -G wheel | |
# password must be encrypted! | |
mkdir -p /home/zuul/.ssh | |
cat << xxEOFxx >> /home/zuul/.ssh/authorized_keys | |
################# < here are your keys > | |
xxEOFxx | |
chmod 700 /home/zuul/.ssh | |
chmod 600 /home/zuul/.ssh/authorized_keys | |
chown -R zuul: /home/zuul/.ssh | |
chown -R zuul: "/home/zuul/.ssh/*" | |
echo 'zuul ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers | |
%end | |
%packages | |
openssh-server | |
nfs-utils | |
yum-utils | |
sos | |
vim | |
%end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment