#cloud-config users: - name: ansible ssh_authorized_keys: - {{ lookup("file", "private/keyfile.pub") }} sudo: ['ALL=(ALL) NOPASSWD:ALL'] groups: sudo shell: /bin/bash