Packer.Images/packer/preseed/UbuntuServer22.04/user-data

43 lines
1.0 KiB
Plaintext
Raw Normal View History

2021-06-07 11:19:00 +00:00
#cloud-config
autoinstall:
version: 1
2023-10-24 07:13:33 +00:00
apt:
geoip: true
preserve_sources_list: false
primary:
- arches: [amd64, i386]
uri: http://archive.ubuntu.com/ubuntu
- arches: [default]
uri: http://ports.ubuntu.com/ubuntu-ports
early-commands:
- sudo systemctl stop ssh
2021-06-07 12:58:00 +00:00
locale: en_US
2021-06-07 11:19:00 +00:00
keyboard:
2023-10-24 07:13:33 +00:00
layout: us
2021-06-07 11:19:00 +00:00
network:
network:
version: 2
ethernets:
ens192:
dhcp4: true
dhcp-identifier: mac
2021-06-07 11:19:00 +00:00
storage:
layout:
2021-06-23 11:05:17 +00:00
name: direct
2021-06-07 11:19:00 +00:00
identity:
2023-10-24 07:13:33 +00:00
hostname: ubuntu-server
username: ubuntu
password: $6$rounds=4096$ZKfzRoaQOtc$M.fhOsI0gbLnJcCONXz/YkPfSoefP4i2/PQgzi2xHEi2x9CUhush.3VmYKL0XVr5JhoYvnLfFwqwR/1YYEqZy/
2021-06-07 11:19:00 +00:00
ssh:
2023-10-24 07:13:33 +00:00
install-server: true
2021-06-07 11:19:00 +00:00
allow-pw: true
2023-10-24 07:13:33 +00:00
packages:
- openssh-server
- open-vm-tools
- cloud-init
2021-06-07 11:19:00 +00:00
user-data:
disable_root: false
late-commands:
- echo 'ubuntu ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/ubuntu
2023-10-24 07:13:33 +00:00
- curtin in-target --target=/target -- chmod 440 /etc/sudoers.d/ubuntu