2020-07-10 00:58:55 +02:00
|
|
|
---
|
|
|
|
{%- from "users/map.jinja" import users with context -%}
|
|
|
|
|
2023-01-04 23:36:10 +01:00
|
|
|
{%- for username, user in users.items() %}
|
2020-07-10 00:58:55 +02:00
|
|
|
{%- if user.sshkeys is defined %}
|
2023-01-04 23:36:10 +01:00
|
|
|
{%- for name, sshkey in user.sshkeys.items() %}
|
|
|
|
ssh-key-{{ username }}-{{ name }}:
|
|
|
|
ssh_auth.{{ sshkey.state }}:
|
2022-06-08 23:48:21 +02:00
|
|
|
- user: {{ username }}
|
2020-07-10 00:58:55 +02:00
|
|
|
- names:
|
2023-01-04 23:36:10 +01:00
|
|
|
- {{ sshkey.value }}
|
2020-07-10 00:58:55 +02:00
|
|
|
- require:
|
2022-06-08 23:48:21 +02:00
|
|
|
- user: user-{{ username }}
|
2020-07-10 00:58:55 +02:00
|
|
|
{% endfor %}
|
|
|
|
{%- endif -%}
|
|
|
|
{% endfor %}
|