1
1
mirror of https://gitlab.archlinux.org/archlinux/infrastructure.git synced 2024-09-28 17:21:46 +02:00
infrastructure/roles/root_ssh/templates/authorized_keys.j2
Kristian Klausen 0d78c950d2 root_ssh: Support multiple SSH keys for the same user
Ex: in case the user has multiple smartcards.
2021-06-02 18:44:58 +02:00

12 lines
436 B
Django/Jinja

#jinja2: lstrip_blocks: True
{% for user in root_ssh_keys | sort(attribute="key") -%}
{% if user.hosts is not defined or inventory_hostname in user.hosts -%}
{{ lookup('file', role_path + '/../../pubkeys/' + user.key ) }}
{% if user.additional_keys is defined %}
{% for key in user.additional_keys | sort -%}
{{ lookup('file', role_path + '/../../pubkeys/' + key ) }}
{% endfor %}
{% endif %}
{% endif %}
{% endfor %}