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