Skip to content

Instantly share code, notes, and snippets.

@dgarros
Created July 1, 2016 17:44
Show Gist options
  • Save dgarros/2cbb5d9ed9ba5947708dc234f67b5223 to your computer and use it in GitHub Desktop.
Save dgarros/2cbb5d9ed9ba5947708dc234f67b5223 to your computer and use it in GitHub Desktop.
{% for user in global.users %}
set system login user {{ user.name }} uid {{ user.uid }}
set system login user {{ user.name }} class {{ user.class }}
{% if user.sshkey is defined %}
{% for key in user.sshkey %}
set system login user {{ user.name }} authentication ssh-rsa "{{ key }}";
{% endfor %}
{% endif %}
{% endfor %}
system {
login {
{% for user in global.users %}
user {{ user.name }} {
uid {{ user.uid }};
class {{ user.class }};
{% if user.sshkey is defined %}
authentication {
{% for key in user.sshkey %}
ssh-rsa "{{ key }}";
{% endfor %}
}
{% endif %}
}
{% endfor %}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment