#cloud-config # See: the cloudinit cloud-config spec hostname: {{ .Hostname }} # add some users... #users: # - name: test # plain_text_passwd: test # groups: sudo # sudo: ALL=(ALL) NOPASSWD:ALL # shell: /bin/bash # lock_passwd: false # Not recommended, you should really create the VM with a root ssh key #chpasswd: # list: | # root: somepassword # expire: False write_files: {{ if ne .InitScriptBase64 "" }}# Additional optional script to run in cloud init post - path: /root/.cloud-init-user.sh encoding: b64 content: {{ .InitScriptBase64 }} owner: root:root permissions: '0755' {{ end -}} {{ if ne .AuthorizedKeys "" }}# Root Keys - path: /root/.ssh/authorized_keys encoding: b64 content: {{ .AuthorizedKeys }} owner: root:root permissions: '0600' {{ end -}} {{ if ne .InitScriptBase64 "" -}} runcmd: - /root/.cloud-init-user.sh {{ end }}