1
1
mirror of https://gitlab.archlinux.org/archlinux/infrastructure.git synced 2025-01-18 08:06:16 +01:00
infrastructure/roles/archusers/templates/authorized_keys.j2
Florian Pritz 28ef4d2828
archusers: Add support for single-host SSH keys
Some of our users have keys that they only want on a few machines and
reconfigure each time we deploy. Now we can configure and deploy such
keys.

Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-11-25 15:51:54 +01:00

10 lines
316 B
Django/Jinja

#jinja2: lstrip_blocks: True
{{ lookup('file', '../pubkeys/' + item.value.ssh_key) }}
{% if item.value.additional_ssh_keys is defined %}
{% for key in item.value.additional_ssh_keys %}
{% if inventory_hostname in key.hosts %}
{{ lookup('file', '../pubkeys/' + key.name) }}
{% endif %}
{% endfor %}
{% endif %}