packer/http/ubuntu-22/user-data

43 lines
949 B
Plaintext

#cloud-config
autoinstall:
version: 1
early-commands:
- systemctl stop ssh
locale: en_US.UTF-8
keyboard:
layout: us
network:
network:
version: 2
ethernets:
eth0:
dhcp4: yes
dhcp-identifier: mac
apt:
preserve_sources_list: false
primary:
- arches: [i386, amd64]
uri: "http://archive.ubuntu.com/ubuntu"
geoip: true
storage:
layout:
name: lvm
identity:
hostname: ubuntu
username: xadmin
password: $6$8DdxHyrH6HfGZhDs$jEadYAMi3CTJivYgGjhG7S2C/ChZxv0w0L6AQ3Egn8K5xIA4OEqDngVfozfn.9kYxy.hWYpzwBE0qwytcU4BF0
late-commands:
- "echo 'xadmin ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/xadmin"
- "chmod 440 /target/etc/sudoers.d/ubuntu"
- "apt install -y qemu-guest-agent"
- "systemctl enable qemu-guest-agent"
- "apt purge -y snapd"
ssh:
allow-pw: true
authorized-keys: []
install-server: true