41 lines
927 B
INI
41 lines
927 B
INI
#cloud-config
|
|
hostname: ${hostname}
|
|
fqdn: ${fqdn}
|
|
manage_etc_hosts: true
|
|
|
|
users:
|
|
- name: ubuntu
|
|
sudo: [ 'ALL=(ALL) NOPASSWD:ALL' ]
|
|
groups: users, admin, sudo
|
|
home: /home/ubuntu
|
|
shell: /bin/bash
|
|
lock_passwd: false
|
|
ssh-authorized-keys:
|
|
- ${file("id_rsa.pub")}
|
|
# false=only cert auth via ssh (console access can still login)
|
|
ssh_pwauth: false
|
|
disable_root: false
|
|
chpasswd:
|
|
list: |
|
|
ubuntu:${password}
|
|
expire: False
|
|
|
|
package_update: true
|
|
packages:
|
|
- qemu-guest-agent
|
|
|
|
# grows root filesystem to take up disk
|
|
growpart:
|
|
mode: auto
|
|
devices: ['/']
|
|
ignore_growroot_disabled: false
|
|
|
|
# every boot
|
|
bootcmd:
|
|
- [ sh, -c, 'echo booted...; echo $(date) | sudo tee -a /root/bootcmd.log' ]
|
|
# run once for setup
|
|
runcmd:
|
|
- [ sh, -c, 'echo setup...; $(date) | sudo tee -a /root/runcmd.log' ]
|
|
# written to /var/log/cloud-init-output.log
|
|
final_message: "The system is now up, after $UPTIME seconds"
|