Revert "Switch to cloud-init for host initialization"
This reverts commit5f7d47783b
. This reverts commit33c62d0c42
.
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
#cloud-boothook
|
||||
|
||||
# Fix hostname after reboot
|
||||
hostnamectl hostname "${hostname}"
|
@@ -1,45 +0,0 @@
|
||||
#cloud-config
|
||||
write_files:
|
||||
|
||||
# Configure private network
|
||||
- content: |
|
||||
BOOTPROTO='dhcp'
|
||||
STARTMODE='auto'
|
||||
path: /etc/sysconfig/network/ifcfg-eth1
|
||||
|
||||
# Disable ssh password authentication
|
||||
- content: |
|
||||
PasswordAuthentication no
|
||||
X11Forwarding no
|
||||
MaxAuthTries 2
|
||||
AllowTcpForwarding no
|
||||
AllowAgentForwarding no
|
||||
AuthorizedKeysFile .ssh/authorized_keys
|
||||
path: /etc/ssh/sshd_config.d/kube-hetzner.conf
|
||||
|
||||
# Setting the right reboot mode
|
||||
- content: |
|
||||
REBOOT_METHOD=kured
|
||||
path: /etc/transactional-update.conf
|
||||
append: true
|
||||
|
||||
# Add ssh authorized keys
|
||||
ssh_authorized_keys:
|
||||
%{ for key in sshAuthorizedKeys ~}
|
||||
- ${key}
|
||||
%{ endfor ~}
|
||||
|
||||
runcmd:
|
||||
|
||||
# Activate the private network
|
||||
- systemctl reload network
|
||||
|
||||
# Activate ssh configuration
|
||||
- systemctl reload sshd
|
||||
|
||||
# Fix hostname (during first boot)
|
||||
- hostnamectl hostname ${hostname}
|
||||
|
||||
# Finishing automatic reboot via Kured setup
|
||||
- systemctl reload transactional-update
|
||||
- rebootmgrctl set-strategy off
|
Reference in New Issue
Block a user