mirror of
https://gitlab.archlinux.org/archlinux/infrastructure.git
synced 2025-01-18 08:06:16 +01:00
Introduce "root_additional_keys" variable allowing us to deploy additional root keys with our "root_ssh" role Signed-off-by: moson <moson@archlinux.org>
17 lines
610 B
Django/Jinja
17 lines
610 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 %}
|
|
{% if root_additional_keys is defined %}
|
|
{% for pubkey in root_additional_keys -%}
|
|
{{ lookup('file', role_path + '/../../pubkeys/' + pubkey ) }}
|
|
{% endfor %}
|
|
{% endif %}
|