Compare commits
2 Commits
a85f4cfde7
...
bfd70ef34e
Author | SHA1 | Date |
---|---|---|
|
bfd70ef34e | |
|
d8118e0fce |
|
@ -0,0 +1,16 @@
|
||||||
|
%post
|
||||||
|
cat > /root/.ssh/authorized_keys <<EOF
|
||||||
|
expiry-time="$(date -d +1hour +%Y%m%d%H%M)",restrict,pty ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICoOO/ZYMxRgmyvqZwGN3NM5pHyh3NBdC7iZrXIopt93 Host Provisioner
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat > /usr/local/libexec/notify-online.sh <<'EOF'
|
||||||
|
{% include "notify-online.sh" %}
|
||||||
|
EOF
|
||||||
|
chmod +x /usr/local/libexec/notify-online.sh
|
||||||
|
|
||||||
|
cat > /etc/systemd/system/notify-online.service <<'EOF'
|
||||||
|
{% include "notify-online.service" %}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
systemctl enable --no-reload notify-online.service
|
||||||
|
%end
|
|
@ -13,7 +13,6 @@ 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
|
||||||
|
@ -27,15 +26,17 @@ 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-systemd
|
sshca-cli
|
||||||
systemd-networkd
|
systemd-networkd
|
||||||
%end
|
%end
|
||||||
|
|
||||||
|
|
|
@ -2,4 +2,4 @@
|
||||||
ignoredisk --only-use /dev/mmcblk0
|
ignoredisk --only-use /dev/mmcblk0
|
||||||
{% include "fedora-disk-dch.ks" %}
|
{% include "fedora-disk-dch.ks" %}
|
||||||
{% include "fedora-rpi-common.ks.j2" %}
|
{% include "fedora-rpi-common.ks.j2" %}
|
||||||
{% include "autoprovision.ks" %}
|
{% include "autoprovision.ks.j2" %}
|
||||||
|
|
|
@ -16,4 +16,4 @@ qemu-guest-agent
|
||||||
-fwupd
|
-fwupd
|
||||||
%end
|
%end
|
||||||
|
|
||||||
{% include "autoprovision.ks" %}
|
{% include "autoprovision.ks.j2" %}
|
||||||
|
|
|
@ -1,26 +1,3 @@
|
||||||
%post
|
|
||||||
cat > /root/.ssh/authorized_keys <<EOF
|
|
||||||
expiry-time="$(date -d +1hour +%Y%m%d%H%M)",restrict,pty ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICoOO/ZYMxRgmyvqZwGN3NM5pHyh3NBdC7iZrXIopt93 Host Provisioner
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat > /usr/local/libexec/notify-online.sh <<'EOF'
|
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -- \
|
|
||||||
-F "hostname=$(hostname -f)" \
|
|
||||||
-F 'sshkeys=<-;type=text/plain'
|
|
||||||
|
|
||||||
fw_cfg=/sys/firmware/qemu_fw_cfg/by_name/opt/dch/cfg-branch/raw
|
|
||||||
if [ -r "${fw_cfg}" ]; then
|
|
||||||
set -- "$@" -F branch="$(cat "${fw_cfg}")"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat /etc/ssh/ssh_host_*_key.pub \
|
|
||||||
| curl -fsS https://webhooks.pyrocufflink.blue/host/online "$@"
|
|
||||||
EOF
|
|
||||||
chmod +x /usr/local/libexec/notify-online.sh
|
|
||||||
|
|
||||||
cat > /etc/systemd/system/notify-online.service <<'EOF'
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Notify infrastructure services that this host is online
|
Description=Notify infrastructure services that this host is online
|
||||||
ConditionFirstBoot=yes
|
ConditionFirstBoot=yes
|
||||||
|
@ -63,7 +40,3 @@ SystemCallFilter=~@privileged @resources
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
|
||||||
|
|
||||||
systemctl enable --no-reload notify-online.service
|
|
||||||
%end
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -- \
|
||||||
|
-F "hostname=$(hostname -f)" \
|
||||||
|
-F 'sshkeys=<-;type=text/plain'
|
||||||
|
|
||||||
|
fw_cfg=/sys/firmware/qemu_fw_cfg/by_name/opt/dch/cfg-branch/raw
|
||||||
|
if [ -r "${fw_cfg}" ]; then
|
||||||
|
set -- "$@" -F branch="$(cat "${fw_cfg}")"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat /etc/ssh/ssh_host_*_key.pub \
|
||||||
|
| curl -fsS https://webhooks.pyrocufflink.blue/host/online "$@"
|
Loading…
Reference in New Issue