#cloud-config autoinstall: version: 1 locale: en_US keyboard: layout: us identity: hostname: ubuntu22-test username: ubuntu password: $6$exDY1mhS4KUYCE/2$zmn9ToZwTKLhCw.b4/b.ZRTIZM30JZ4QrOQ2aOXJ8yk96xpcCof0kxKwuX1kqLG/ygbJ1f8wxED22bTL4F46P0 kernel: {package: linux-generic} ssh: { allow-pw: true, authorized-keys: [], install-server: true } storage: config: - { ptable: gpt, path: /dev/sda, wipe: superblock-recursive, preserve: false, name: '', grub_device: true, type: disk, id: disk-sda } - { device: disk-sda, size: 1048576, wipe: superblock, flag: bios_grub, number: 1, preserve: false, type: partition, id: partition-0 } - { device: disk-sda, size: 2147483648, wipe: superblock, number: 2, preserve: false, grub_device: false, type: partition, id: partition-1 } - { fstype: ext4, volume: partition-1, preserve: false, type: format, id: format-0 } - { device: disk-sda, size: -1, wipe: superblock, flag: '', number: 3, preserve: false, grub_device: false, type: partition, id: partition-2 } - { name: ubuntu-vg, devices: [ partition-2 ], preserve: false, type: lvm_volgroup, id: lvm_volgroup-0 } - { name: ubuntu-lv, volgroup: lvm_volgroup-0, size: 50G, wipe: superblock, preserve: false, type: lvm_partition, id: lvm_partition-0 } - { fstype: ext4, volume: lvm_partition-0, preserve: false, type: format, id: format-2 } - { path: /, device: format-1, type: mount, id: mount-1 } - { path: /boot, device: format-0, type: mount, id: mount-0 } #Swap LV - { name: swap, volgroup: lvm_volgroup-0, size: 1G, wipe: superblock, preserve: false, type: lvm_partition, id: lvm_partition-1 } - { fstype: swap, volume: lvm_partition-1, preserve: false, type: format, id: format-3 } - { path: '', device: format-3, type: mount, id: mount-3 } late-commands: - | rm /target/etc/netplan/00-installer-config.yaml cat < /target/etc/netplan/01-installer-config.yaml network: version: 2 ethernets: enp1s0f0: dhcp4: false enp1s0f1: dhcp4: false addresses: - 108.170.15.170/29 - 108.170.15.171/29 - 108.170.15.172/29 - 108.170.15.173/29 - 108.170.15.174/29 gateway4: 108.170.15.169 nameservers: addresses: [8.8.8.8,8.8.4.4] EOF - sed '/^ubuntu/s/99999/2/' /etc/shadow updates: security