#cloud-config
#password: fedora
#chpasswd: {expire: False}
#ssh_pwauth: True
ssh_authorized_keys:
  - "{{ pubkey_local['stdout'] }}"

# Add users to the system. Users are added after groups are added.
users:
{% for item in res_def['cloud_config']['users'] %}
  - name: {{ item['name'] | default('admin') }}
    gecos: {{ item['gecos'] | default('Admin User') }}
    groups: {{ item['groups'] | default('wheel') }}
    sudo: {{ item['sudo'] | default('ALL=(ALL) NOPASSWD:ALL')}}
    ssh-import-id: {{ item['ssh-import-id'] | default('None') }}
    lock_passwd: {{ item['lock_passwd'] | default('true') }}
    ssh-authorized-keys:
      - {{ pubkey_local['stdout'] }}
{% endfor %}

timezone: UTC

runcmd:
 - systemctl disable cloud-init.service
 - systemctl disable cloud-init-local.service
 - systemctl disable cloud-final.service
 - systemctl disable cloud-config.service
 - poweroff
