test(packer): add initial cloud-init files.

This commit is contained in:
Alexandre Pujol 2023-04-16 22:16:10 +01:00
parent bbb43cdf55
commit e75d07b865
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
3 changed files with 202 additions and 0 deletions

View file

@ -0,0 +1,45 @@
#cloud-config
hostname: ${hostname}
ssh_pwauth: true
users:
- name: ${username}
plain_text_passwd: ${password}
shell: /bin/bash
ssh_authorized_keys:
- ${ssh_key}
lock_passwd: false
sudo: ALL=(ALL) NOPASSWD:ALL
package_update: true
package_upgrade: true
package_reboot_if_required: false
packages:
- apparmor-profiles
- build-essential
- config-package-dev
- debhelper
- devscripts
- golang-go
- htop
- lsb-release
- qemu-guest-agent
- rsync
- vim
write_files:
# Network configuration
- path: /etc/systemd/network/20-wired.network
owner: 'root:root'
permissions: '0644'
content: |
[Match]
Name=en*
[Network]
DHCP=yes
[DHCPv4]
RouteMetric=10