packer/http/ubuntu-22/user-data

46 lines
1.0 KiB
Plaintext

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