This kickstart file was rendered from the Foreman provisioning template âKickstart defaultâ.
install
url --url Sign in to your account
lang en_US.UTF-8
selinux --enforcing
keyboard us
skipx
network --device=00:50:56:81:a5:8e --hostname hylforemanclient.micron.com --noipv6 --bootproto dhcp --mtu=1500 --nameserver=10.70.84.5,10.71.157.5
rootpw --iscrypted $5$nUSqKmJZdnJnLsxI$8eMmDbIAGBPR7rrE6neLN3le9LBDsIeoA2wv407r326
firewall --ssh
authconfig --useshadow --passalgo=sha256 --kickstart
timezone --utc UTC
services --disabled gpm,sendmail,cups,pcmcia,isdn,rawdevices,hpoj,bluetooth,openibd,avahi-daemon,avahi-dnsconfd,hidd,hplip,pcscd
bootloader --location=mbr --append=ânofb quiet splash=quietâ
zerombr
clearpart --all --initlabel
part /boot --fstype xfs --size 500 --asprimary
part pv.01 --ondisk sda --grow --size=8192
volgroup vg0 pv.01
logvol swap --vgname=vg0 --size=2048 --name=lvswap
logvol / --vgname=vg0 --size=2048 --name=lvroot --fstype=xfs
logvol /usr --vgname=vg0 --size=8192 --name=lvusr --fstype=xfs
logvol /tmp --vgname=vg0 --size=4096 --name=lvtmp --fstype=xfs
logvol /opt --vgname=vg0 --size=4096 --name=lvopt --fstype=xfs
logvol /var --vgname=vg0 --size=1024 --name=lvvar --fstype=xfs --grow
text
reboot
%packages
yum
dhclient
-ntp
chrony
wget
@Core
%end
%post --nochroot
exec < /dev/tty3 > /dev/tty3
chvt 3
(
chvt 1
) 2>&1 | tee /mnt/sysimage/root/install.postnochroot.log
%post
exec < /dev/tty3 > /dev/tty3
chvt 3
(
logger âStarting anaconda hylforemanclient.micron.com postinstallâ
ens192 interface
real=grep -l 00:50:56:81:a5:8e /sys/class/net/*/{bonding_slave/perm_hwaddr,address} 2>/dev/null | awk -F '/' '// {print $5}' | head -1
sanitized_real=echo $real | sed s/:/_/
cat << EOF > /etc/sysconfig/network-scripts/ifcfg-$sanitized_real
BOOTPROTO=âdhcpâ
DOMAIN=âmicron.comâ
DEVICE=$real
HWADDR=â00:50:56:81:a5:8eâ
ONBOOT=yes
PEERDNS=yes
PEERROUTES=yes
DEFROUTE=yes
MTU=1500
EOF
echo âUpdating system timeâ
yum -y install ntpdate
systemctl enable --now ntpd
/usr/sbin/hwclock --systohc
update all the base packages from the updates repository
if [ -f /usr/bin/dnf ]; then
dnf -y update
else
yum -t -y update
fi
user_exists=false
getent passwd root >/dev/null 2>&1 && user_exists=true
if $user_exists; then
mkdir -p ~root/.ssh
cat << EOF >> ~root/.ssh/authorized_keys
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC8iRY0QIwm6Lk33F+kbZDJKeSyMJmJFkl3RDowvPAV5BqIk3hqlfaxDiQlRrBvsOYk/LyuKDee0ST+oF6P41ymfDnfulLi5XSzFcFehU7yI+r4josjjS5iaWDN9aho3Hr0QJHeWdfQJiSL63m4R/vC6vrTRoacX+9NWW5zF9RXYpHKVLpiiWXH6Yu6E16I6mZCwfTQ1Wq3l/lHnQNOXsBjHAlx330GQXtxhFKIWEWhMACMfpURe3gXbHNQxU3WKrnCsPjhh79NMHnW72/ac3Q9yJS4+vCyeZPO62kt7f4eW8qEuQ/603vlVGsUS4ANMfB34OF7GO8hPl5het1lQ2iT foreman-proxy@hylformanproxy.micron.com
EOF
chmod 0700 ~root/.ssh
chmod 0600 ~root/.ssh/authorized_keys
chown -R root: ~root/.ssh
Restore SELinux context with restorecon, if itâs available:
command -v restorecon && restorecon -RvF ~root/.ssh || true
else
echo âThe remote_execution_ssh_user does not exist and remote_execution_create_user is not set to true. remote_execution_ssh_keys snippet will not install keysâ
fi
touch /tmp/foreman_built
chvt 1
) 2>&1 | tee /root/install.post.log
copy %pre log files into chroot
%post --nochroot
cp -vf /tmp/.pre..log /mnt/sysimage/root/
%end
%post
if test -f /tmp/foreman_built; then
echo âcalling home: build is done!â
if [ -x /usr/bin/curl ]; then
/usr/bin/curl -o /dev/null --noproxy * -H âContent-Type: text/plainâ --data @/root/install.post.log --silent âhttp://hylformanproxy.micron.com:8000/unattended/built?token=85b4b3dc-077e-4a9a-bdec-5e5a834429e4â
elif [ -x /usr/bin/wget ]; then
/usr/bin/wget -q -O /dev/null --no-proxy --method POST --header âContent-Type: text/plainâ --body-file=/root/install.post.log âhttp://hylformanproxy.micron.com:8000/unattended/built?token=85b4b3dc-077e-4a9a-bdec-5e5a834429e4â
else
wget -q -O /dev/null --header âContent-Type: text/plainâ âhttp://hylformanproxy.micron.com:8000/unattended/built?token=85b4b3dc-077e-4a9a-bdec-5e5a834429e4â
fi
else
echo âcalling home: build failed!â
if [ -x /usr/bin/curl ]; then
/usr/bin/curl -o /dev/null --noproxy * -H âContent-Type: text/plainâ --data @/root/install.post.log --silent âhttp://hylformanproxy.micron.com:8000/unattended/failed?token=85b4b3dc-077e-4a9a-bdec-5e5a834429e4â
elif [ -x /usr/bin/wget ]; then
/usr/bin/wget -q -O /dev/null --no-proxy --method POST --header âContent-Type: text/plainâ --body-file=/root/install.post.log âhttp://hylformanproxy.micron.com:8000/unattended/failed?token=85b4b3dc-077e-4a9a-bdec-5e5a834429e4â
else
wget -q -O /dev/null --header âContent-Type: text/plainâ âhttp://hylformanproxy.micron.com:8000/unattended/failed?token=85b4b3dc-077e-4a9a-bdec-5e5a834429e4â
fi
fi
sync
%end