Replace kickstart with ignition

This commit is contained in:
Khue Doan 2021-06-13 02:02:22 +07:00
parent 7751b83a7e
commit 77d87f0c33
3 changed files with 7 additions and 56 deletions

View File

@ -0,0 +1,7 @@
variant: fcos
version: 1.3.0
passwd:
users:
- name: core
ssh_authorized_keys:
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBbqNJWKwLmwkeHQVUVT/pEis/wvRqRSKG9Dpl166NGp

View File

@ -1,55 +0,0 @@
#version=DEVEL
%pre --interpreter=/bin/sh
mac=$(ip --brief link show dev {{ network_interface }} | tr -s ' ' | cut -d ' ' -f 3 | sed 's/:/-/g')
curl "http://{{ ansible_default_ipv4.address }}/kickstart/network/$mac.ks" > /tmp/network.ks
%end
# 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 }}
# TODO (bug) Fix only 15GiB root partition
autopart
# Network information
%include /tmp/network.ks
# Use network installation
url --url="http://{{ ansible_default_ipv4.address }}/Fedora/"
# Disable Setup Agent on first boot
firstboot --disable
# Do not configure the X Window System
skipx
# System services
services --enabled="chronyd"
# System timezone
timezone Asia/Ho_Chi_Minh --utc
# Create user (locked by default)
user --groups=wheel --name={{ os_username }}
# Add SSH key
sshkey --username=root "{{ ssh_public_key }}"
# SELinux
selinux --disabled
# Firewall
firewall --disabled
%packages
@^server-product-environment
%end
# Enable some services for Kubernetes
services --enable=iscsid
reboot

View File

@ -1 +0,0 @@
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