Last active
December 31, 2019 16:14
-
-
Save thbe/1381bfb713cf1f9b8412 to your computer and use it in GitHub Desktop.
OEL7 kickstart base
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 | |
# | |
# OEL7 kickstart baseline installation file | |
# | |
# Author: Thomas Bendler <[email protected]> | |
# Date: Fri Feb 5 12:12:46 CET 2016 | |
# Revision: 0.5 | |
# | |
# Distribution: Oracle Enterprise Linux | |
# Version: 7.x | |
# Processor: x86_64 | |
# Generic installation options | |
cdrom | |
text | |
firstboot --disable | |
logging --level=info | |
reboot --eject | |
# System language and time settings | |
lang en_US.UTF-8 | |
keyboard --vckeymap=us --xlayouts='us' | |
timezone Europe/Berlin --isUtc --ntpservers=0.rhel.pool.ntp.org,1.rhel.pool.ntp.org,2.rhel.pool.ntp.org,3.rhel.pool.ntp.org | |
# Security settings | |
auth --enableshadow --passalgo=sha512 | |
firewall --enabled --service=ssh | |
selinux --permissive | |
# Network settings | |
network --bootproto=dhcp --device=enp0s3 --ipv6=auto --activate | |
network --hostname=localhost.localdomain | |
repo --name="Server-HighAvailability" --baseurl=file:///run/install/repo/addons/HighAvailability | |
repo --name="Server-ResilientStorage" --baseurl=file:///run/install/repo/addons/ResilientStorage | |
# Disc settings | |
zerombr | |
clearpart --all --initlabel | |
bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=sda | |
autopart --type=lvm | |
ignoredisk --only-use=sda | |
# User settings (password: hamburg1) | |
rootpw --iscrypted $6$WYx8jpVu/jAyvXEl$n2aYNqFCFvMWebHVjS.MrDbheQ7AE4zOpfZnWpXq0tnT43MSnMIDzANW8MqltNHfbRaebLlMPodfdObwTbh5g/ | |
user --groups=wheel --homedir=/home/sysdeploy --name=sysdeploy --password=$6$CmofRJck/r0rcYck$De8OqS.OqrFS3BDpnmQsE88aj93KZZtcTdlniXpeGr4HRPUMr9Vl8zBml3JxrabBJiY4a1LGcEv6PSo5bfIwI1 --iscrypted --gecos="System Deploy" | |
# Package group and packages that will be installed | |
%packages | |
@core | |
kexec-tools | |
vim-enhanced | |
redhat-lsb | |
deltarpm | |
system-storage-manager | |
gpm | |
%end | |
%addon com_redhat_kdump --enable --reserve-mb='auto' | |
%end | |
# Additional actions before installation | |
%pre | |
# Load specific boot args starting with custom_* into variables | |
mkdir -p /kickstart | |
< /proc/cmdline sed 's/ /\n/g' | /bin/grep -E "^custom_" | /bin/grep = > /kickstart/custom-args | |
. /kickstart/custom-args | |
%end | |
# Additional actions after installation | |
%post --log=/root/kickstart-post.log | |
/usr/bin/logger "Starting anaconda postinstall" | |
# Update all the base packages from the updates repository | |
echo "Add puppet and apply all updates to base system" | |
/bin/rpm -ivh https://yum.puppetlabs.com/puppetlabs-release-pc1-el-7.noarch.rpm | |
/usr/bin/yum clean all | |
/usr/bin/yum -t -y -e 0 update | |
/usr/bin/yum -t -y -e 0 install puppet-agent | |
echo "Prepare base system" | |
/opt/puppetlabs/bin/puppet module install thbe-yum | |
/opt/puppetlabs/bin/puppet module install thbe-style | |
/opt/puppetlabs/bin/puppet apply -e 'class { "yum": }' | |
/opt/puppetlabs/bin/puppet apply -e 'class { "style": }' | |
# Final sync | |
echo "Sync and finalize kickstart installation" | |
sync | |
exit 0 | |
%end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment