khuedoan-homelab/metal/roles/pxe-server/templates/kickstart.ks.j2

52 lines
1.3 KiB
Plaintext
Raw Normal View History

2021-08-31 02:11:33 +07:00
#version=RHEL8
2021-08-30 23:47:16 +07:00
# Do not use graphical install
text
# Keyboard layouts
keyboard --xlayouts='us'
# System language
lang en_US.UTF-8
# Partition clearing information
clearpart --all --drives={{ disk }}
# Partitioning
ignoredisk --only-use={{ disk }}
autopart
# Network information
2021-08-31 04:17:59 +07:00
network --bootproto=static --device={{ network_interface }} --ip={{ hostvars[item]['ansible_host'] }} --gateway={{ ansible_default_ipv4.gateway }} --nameserver={{ dns_server }} --netmask={{ ansible_default_ipv4.netmask }} --ipv6=auto --hostname={{ hostvars[item]['inventory_hostname'] }} --activate
2021-08-30 23:47:16 +07:00
# Use network installation
2021-08-31 02:11:33 +07:00
repo --name="Minimal" --baseurl=http://{{ ansible_default_ipv4.address }}/os/Minimal
2021-08-31 04:17:59 +07:00
url --url="http://{{ ansible_default_ipv4.address }}/os"
2021-08-30 23:47:16 +07:00
# Disable Setup Agent on first boot
firstboot --disable
# Do not configure the X Window System
skipx
2021-08-31 02:11:33 +07:00
# Enable NTP
2021-08-30 23:47:16 +07:00
services --enabled="chronyd"
# System timezone
2021-08-31 02:11:33 +07:00
timezone {{ timezone }} --isUtc
2021-08-30 23:47:16 +07:00
# Create user (locked by default)
2021-08-31 02:11:33 +07:00
user --groups=wheel --name=admin
2021-08-30 23:47:16 +07:00
# Add SSH key
sshkey --username=root "{{ ssh_public_key }}"
2021-08-31 02:11:33 +07:00
# Disable SELinux
2021-08-30 23:47:16 +07:00
selinux --disabled
2021-08-31 02:11:33 +07:00
# Disable firewall
2021-08-30 23:47:16 +07:00
firewall --disabled
%packages
2021-08-31 02:11:33 +07:00
@^minimal-environment
2021-08-31 04:38:30 +07:00
iscsi-initiator-utils
2021-08-30 23:47:16 +07:00
%end
2021-08-31 02:11:33 +07:00
# Enable iSCSI for Kubernetes storage
2021-08-30 23:47:16 +07:00
services --enable=iscsid
reboot