#cloud-config
# vim: syntax=yaml
# examples:
# https://cloudinit.readthedocs.io/en/latest/topics/examples.html
bootcmd:
  - echo 192.168.0.1 gw.homedns.xyz >> /etc/hosts
hostname: ${vm_hostname} 
package_update: true
package_upgrade: true
packages: ['qemu-guest-agent']
runcmd:
 - [ ls, -l, / ]
 - [ sh, -xc, "echo $(date) ': hello world!'" ]
 - [ systemctl, daemon-reload ]
 - [ systemctl, enable, qemu-guest-agent.service ] 
 - [ systemctl, start, --no-block, qemu-guest-agent.service ]
ssh_pwauth: true
disable_root: false
chpasswd:
  list: |
     root:password
  expire: false
users:
  - name: ubuntu
    sudo: ALL=(ALL) NOPASSWD:ALL
    groups: users, admin
    home: /home/ubuntu
    shell: /bin/bash
    lock_passwd: false
    ssh-authorized-keys:
      - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCtU8bRGqwt13HgTbL/YDj19ljVUsZPTGFfdLUA4k4dPrVuQR77c7pdMPW25j/NS5LbnkKhEEoMJB7qzcGBBKiMAA9J30jJxqXeV48VUKNxByTEQEqQ8FpnQICpvFueEyP/AX6/gLy77a1IldTWabNmplJqxBkksn1P1q8EIzXlXu0Xj1WGNxW/yF+Unp28qvqNuWlLyAwOfMcYUO1a7XUsD3/vcjNySqH6TlJAf8VDTNidcZXvyWJf2WjSK85NNJCLSVDdJ5/595PnjWxYnML8gyDo0qUAxhx3jMVT3sa5Wd/aonMYNpm2YwjZQuFPksotvkEk7ZIqE6ejBh+oX52uwoVDG38TfQRkpxp6psn+ZtSaa+/Jf9eqHGWRgwrgSKP56ezvILZxcOzBfXcszGBYRLUMJbMqYpRAO24SfrYrKM5DKs9yFQHkgybcho406DCluQ5MhqiO4UPc22cQ8fxTSdLxLBlPOpP0rkgh5zz54DHhhmKgGzBIWxKfN+M+5CE= tobias@hqt 
final_message: "The system is finally up, after $UPTIME seconds"
