paulbsd-salt/states/users/sshkeys.sls

17 lines
389 B
Plaintext
Raw Normal View History

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