#cloud-config preserve_hostname: False hostname: {{ inventory_hostname }} users: - name: ansible ssh_authorized_keys: - {{ lookup("file", "private/keyfile.pub") }} sudo: ['ALL=(ALL) NOPASSWD:ALL'] groups: sudo shell: /bin/bash runcmd: - eject /dev/sr0 - systemctl disable cloud-init