Files
Harvester.Images/cloud-init/user-data.template
Danny Bessems 8151350d20
Some checks failed
build-image / Build image (push) Failing after 7m40s
build: Assert successful completion of cloud-init
2025-07-28 22:44:52 +10:00

38 lines
884 B
Plaintext

#cloud-config
package_update: true
package_upgrade: true
snap:
commands:
00: snap refresh --hold=forever
package_reboot_if_required: true
packages:
- qemu-guest-agent
- yq
- cifs-utils
runcmd:
- apt-get install -y linux-modules-extra-$(uname -r)
- sysctl -w net.ipv6.conf.all.disable_ipv6=1
- systemctl enable --now qemu-guest-agent.service
- cloud-init clean --logs
- truncate -s 0 /etc/hostname /etc/machine-id
- rm -f /etc/ssh/ssh_host_* /var/lib/dbus/machine-id
- ln -s /etc/machine-id /var/lib/dbus/machine-id
- touch /var/lib/cloud-init/template-generation-success
disable_root: false
users:
- name: root
hashed_passwd: ${ROOT_HASHED_PASSWORD}
lock_passwd: false
shell: /bin/bash
ssh_authorized_keys:
- ${PUBLIC_SSHKEY}
ssh_authorized_keys:
- ${PUBLIC_SSHKEY}
power_state:
delay: now
mode: poweroff
condition: true