#cloud-config

ssh_pwauth: false
users:
  - name: root
    ssh_authorized_keys:
      - {{ ssh_keypair.public_key }}
  {% if item.network_ssh_user != 'root' -%}
  - name: {{ item.network_ssh_user }}
    groups: admin,users,sudo,wheel
    shell: /bin/bash
    sudo: ["ALL=(ALL) NOPASSWD:ALL"]
    lock_passwd: true
    ssh_authorized_keys:
      - {{ ssh_keypair.public_key }}
  {% endif %}
