tweaked cloud-init
This commit is contained in:
parent
bb1ba49936
commit
33c62d0c42
@ -49,15 +49,6 @@ resource "hcloud_server" "server" {
|
||||
done
|
||||
EOT
|
||||
}
|
||||
|
||||
provisioner "remote-exec" {
|
||||
inline = [
|
||||
# Disable automatic reboot (after transactional updates), and configure the reboot method as kured
|
||||
"set -ex",
|
||||
"rebootmgrctl set-strategy off",
|
||||
"echo 'REBOOT_METHOD=kured' > /etc/transactional-update.conf",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
resource "hcloud_server_network" "server" {
|
||||
|
@ -17,6 +17,12 @@ write_files:
|
||||
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 ~}
|
||||
@ -33,3 +39,7 @@ runcmd:
|
||||
|
||||
# Fix hostname (during first boot)
|
||||
- hostnamectl hostname ${hostname}
|
||||
|
||||
# Finishing automatic reboot via Kured setup
|
||||
- systemctl reload transactional-update
|
||||
- rebootmgrctl set-strategy off
|
Loading…
Reference in New Issue
Block a user