Files
Harvester.Images/cloud-init/user-data.template

39 lines
917 B
Plaintext
Raw Normal View History

2025-07-25 15:33:21 +10:00
#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
- echo "TEMPLATE_GENERATION_SUCCESS" | tee /var/log/template-generation-success
- sync
2025-07-25 15:33:21 +10:00
disable_root: false
users:
- name: root
hashed_passwd: ${ROOT_HASHED_PASSWORD}
2025-07-25 15:33:21 +10:00
lock_passwd: false
shell: /bin/bash
ssh_authorized_keys:
- ${PUBLIC_SSHKEY}
2025-07-25 15:33:21 +10:00
ssh_authorized_keys:
- ${PUBLIC_SSHKEY}
power_state:
delay: now
mode: poweroff
condition: true