#cloud-config hostname: {name} # add host to the /etc/hosts manage_etc_hosts: true # don't disable the root user disable_root: false users: # create the user for me - name: myuser # I like to sudo! groups: sudo sudo: ALL=(ALL) NOPASSWD:ALL lock_passwd: false # set user password. Can be generated with mkpasswd (in whois package) # mkpasswd --method=SHA-512 passwd: $6$pwewv ssh_authorized_keys: - ssh-rsa MY_SSH_KEY_GOES_HERE... shell: /bin/bash # update SSH key for root (probably not a best practice to allow this but...) - name: root ssh_authorized_keys: - ssh-rsa MY_SSH_KEY_GOES_HERE... # Update APT repo and upgrade packages package_update: true package_upgrade: true # Install a few packages packages: - htop - nano locale: en_US.UTF-8 timezone: America/Edmonton runcmd: # Download and install XE Guest Utils from Github Repo - curl -sL https://github.com/xenserver/xe-guest-utilities/releases/download/v8.4.0/xe-guest-utilities_8.4.0-1_amd64.deb -o /tmp/xe-guest-utilities.deb && sudo dpkg -i /tmp/xe-guest-utilities.deb # Disable password-based authentication for SSH ssh_pwauth: False