Compare commits
2 Commits
master
...
dev/autopr
| Author | SHA1 | Date | |
|---|---|---|---|
| c96f3918b4 | |||
| 0f091f9dfe |
4
Makefile
4
Makefile
@@ -1,10 +1,8 @@
|
|||||||
KICKSTARTS = \
|
KICKSTARTS = \
|
||||||
fedora-dc.ks \
|
|
||||||
fedora-rpi-nvme-noswap.ks \
|
fedora-rpi-nvme-noswap.ks \
|
||||||
fedora-rpi-nvme.ks \
|
fedora-rpi-nvme.ks \
|
||||||
fedora-rpi.ks \
|
fedora-rpi.ks \
|
||||||
fedora.ks \
|
fedora.ks
|
||||||
nvr2.ks \
|
|
||||||
|
|
||||||
.PHONY: all clean publish
|
.PHONY: all clean publish
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
%post
|
%packages
|
||||||
cat > /root/.ssh/authorized_keys <<EOF
|
dch-autoprovision
|
||||||
expiry-time="$(date -d +1hour +%Y%m%d%H%M)",restrict,pty ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICoOO/ZYMxRgmyvqZwGN3NM5pHyh3NBdC7iZrXIopt93 Host Provisioner
|
%end
|
||||||
EOF
|
|
||||||
|
%post
|
||||||
cat > /usr/local/libexec/notify-online.sh <<'EOF'
|
{
|
||||||
{% include "notify-online.sh" %}
|
ls -la /root/.ssh
|
||||||
EOF
|
chmod -R 700 /root/.ssh
|
||||||
chmod +x /usr/local/libexec/notify-online.sh
|
cat /root/.ssh/authorized_keys
|
||||||
|
systemctl enable --no-reload notify-online.service
|
||||||
cat > /etc/systemd/system/notify-online.service <<'EOF'
|
sed -i 's/.*ForwardToConsole.*/ForwardToConsole=yes/' /etc/systemd/journald.conf
|
||||||
{% include "notify-online.service" %}
|
grep ForwardTo /etc/systemd/journald.conf
|
||||||
EOF
|
passwd -d root
|
||||||
|
exit 0
|
||||||
systemctl enable --no-reload notify-online.service
|
} > /dev/console
|
||||||
%end
|
%end
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ reboot
|
|||||||
-NetworkManager
|
-NetworkManager
|
||||||
-authconfig
|
-authconfig
|
||||||
-dhcp-client
|
-dhcp-client
|
||||||
|
-dnf-plugins-core
|
||||||
-dnf-yum
|
-dnf-yum
|
||||||
-dracut-config-rescue
|
-dracut-config-rescue
|
||||||
-man-db
|
-man-db
|
||||||
@@ -26,17 +27,15 @@ reboot
|
|||||||
-yum
|
-yum
|
||||||
chrony
|
chrony
|
||||||
dnf
|
dnf
|
||||||
dnf-command(system-upgrade)
|
|
||||||
e2fsprogs
|
e2fsprogs
|
||||||
grubby
|
grubby
|
||||||
kitty-terminfo
|
kitty-terminfo
|
||||||
openssh-server
|
openssh-server
|
||||||
python3-libdnf5
|
|
||||||
python3-libselinux
|
python3-libselinux
|
||||||
python3-policycoreutils
|
python3-policycoreutils
|
||||||
rng-tools
|
rng-tools
|
||||||
selinux-policy-targeted
|
selinux-policy-targeted
|
||||||
sshca-cli
|
sshca-cli-systemd
|
||||||
systemd-networkd
|
systemd-networkd
|
||||||
%end
|
%end
|
||||||
|
|
||||||
|
|||||||
@@ -1,56 +0,0 @@
|
|||||||
{# vim: set ft=sh.jinja sw=4 ts=4 sts=4 et : -#}
|
|
||||||
|
|
||||||
bootloader --location mbr
|
|
||||||
clearpart --all --initlabel
|
|
||||||
reqpart
|
|
||||||
|
|
||||||
{% include "fedora-disk-dch.ks" %}
|
|
||||||
{% include "fedora-common.ks" %}
|
|
||||||
|
|
||||||
%packages
|
|
||||||
qemu-guest-agent
|
|
||||||
-*-firmware
|
|
||||||
-fwupd
|
|
||||||
%end
|
|
||||||
|
|
||||||
%post --erroronfail
|
|
||||||
set -e
|
|
||||||
|
|
||||||
rm -rf /etc/sysconfig/network-scripts /etc/sysconfig/network
|
|
||||||
|
|
||||||
ifname=$(ip -o route get 1.1.1.1 | awk '{print $5}')
|
|
||||||
gateway=$(ip -o route get 1.1.1.1 | awk '{print $3}')
|
|
||||||
macaddr=$(ip address show dev ${ifname} | awk '$1=="link/ether"{print $2}')
|
|
||||||
ipaddr=$(ip address show dev ${ifname} | awk '$1=="inet"{print $2;exit}')
|
|
||||||
if [ -f /run/systemd/resolve/resolv.conf ]; then
|
|
||||||
resolv_conf=/run/systemd/resolve/resolv.conf
|
|
||||||
else
|
|
||||||
resolv_conf=/etc/resolv.conf
|
|
||||||
fi
|
|
||||||
nameservers=$(awk '$1=="nameserver"{print $2}' "${resolv_conf}" | xargs)
|
|
||||||
|
|
||||||
cat > /etc/systemd/network/40-pyrocufflink.network <<EOF
|
|
||||||
[Match]
|
|
||||||
MACAddress=${macaddr}
|
|
||||||
|
|
||||||
[Network]
|
|
||||||
Description=pyrocufflink.blue network
|
|
||||||
Address=${ipaddr}
|
|
||||||
Gateway=${gateway}
|
|
||||||
DNS=${nameservers}
|
|
||||||
Domains=pyrocufflink.blue
|
|
||||||
EOF
|
|
||||||
|
|
||||||
ln -srf /run/systemd/resolve/resolv.conf /etc/resolv.conf
|
|
||||||
mkdir -p /etc/systemd/resolved.conf.d
|
|
||||||
cat > /etc/systemd/resolved.conf.d/no-stub-listener.conf <<'EOF'
|
|
||||||
[Resolve]
|
|
||||||
DNSStubListener=no
|
|
||||||
EOF
|
|
||||||
%end
|
|
||||||
|
|
||||||
%post
|
|
||||||
cat > /root/.ssh/authorized_keys <<EOF
|
|
||||||
sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAINZCN2cxMDwedJ1Ke23Z3CZRcOYjqW8fFqsooRus7RK0AAAABHNzaDo= dustin@rosalina.pyrocufflink.blue
|
|
||||||
EOF
|
|
||||||
%end
|
|
||||||
15
nvr2.ks.j2
15
nvr2.ks.j2
@@ -1,15 +0,0 @@
|
|||||||
{# vim: set ft=sh.jinja sw=4 ts=4 sts=4 et : -#}
|
|
||||||
|
|
||||||
# Create the "standard" disk layout using only the first disk
|
|
||||||
# Other disks are left alone in case they already contain data, e.g.
|
|
||||||
# migrated from another system.
|
|
||||||
ignoredisk --only-use /dev/nvme0n1
|
|
||||||
bootloader --location mbr
|
|
||||||
clearpart --all --initlabel
|
|
||||||
reqpart
|
|
||||||
|
|
||||||
network --hostname=nvr2.pyrocufflink.blue
|
|
||||||
|
|
||||||
{% include "fedora-disk-dch.ks" %}
|
|
||||||
{% include "fedora-common.ks" %}
|
|
||||||
{% include "autoprovision.ks.j2" %}
|
|
||||||
Reference in New Issue
Block a user