vm-setup/roles/create-vm/templates/user-data.j2

33 lines
659 B
Django/Jinja

#cloud-config
hostname: '{{ vmname }}'
ssh_pwauth: false
# sets authorized ssh-keys keys for probably all users
ssh_authorized_keys:
{% for key in ssh_pubkeys %}
- {{ key }}
# sets the default's users password
password:{{ vms_pass }}
##
# use the following, to set individual user passwords
##
# chpasswd:
# expire: false
# list:
# - user:{{ vms_pass }}
# - root:{{ vms_pass }}
#
# users:
# - name: user
# groups: sudo
# shell: /bin/bash
# ssh_authorized_keys:
#{% for key in ssh_pubkeys %}
# - {{ key }}
#{% endfor %}
# - name: root
# ssh_authorized_keys:
#{% for key in ssh_pubkeys %}
# - {{ key }}
#{% endfor %}