packer/http/ubuntu/user-data

46 lines
1.0 KiB
Plaintext
Raw Normal View History

2024-04-19 14:00:34 -04:00
#cloud-config
autoinstall:
version: 1
2024-04-19 14:00:34 -04:00
early-commands:
- systemctl stop ssh
2024-04-19 14:00:34 -04:00
locale: en_US.UTF-8
keyboard:
layout: us
2024-04-19 14:00:34 -04:00
apt:
geoip: true
2024-04-19 14:00:34 -04:00
preserve_sources_list: false
primary:
- arches: [i386, amd64]
uri: "http://archive.ubuntu.com/ubuntu"
2024-04-19 14:00:34 -04:00
storage:
layout:
name: lvm
identity:
hostname: ubuntu
username: xadmin
password: $6$8DdxHyrH6HfGZhDs$jEadYAMi3CTJivYgGjhG7S2C/ChZxv0w0L6AQ3Egn8K5xIA4OEqDngVfozfn.9kYxy.hWYpzwBE0qwytcU4BF0
user-data:
disable_root: true
package_upgrade: true
2024-04-19 14:00:34 -04:00
ssh:
allow-pw: true
authorized-keys: []
install-server: true
2024-04-20 23:04:02 -04:00
packages:
- "qemu-guest-agent"
late-commands:
- "echo 'xadmin ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/xadmin"
- "chmod 440 /target/etc/sudoers.d/xadmin"
2024-04-20 23:04:02 -04:00
- "curtin in-target --target=/target -- apt install -y qemu-guest-agent"
- "curtin in-target --target=/target -- systemctl enable qemu-guest-agent"
- "curtin in-target --target=/target -- systemctl start qemu-guest-agent"