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
Kristian Klausen db2a1bf348 Restrict the users on mail.a.o to the passwd command
The users are only meant as a way to change the mail password and
setting up forwarding (~/.forward), the latter will be handled by the
DevOps team now.
2021-07-16 01:48:14 +00:00

17 lines
552 B
Django/Jinja

#jinja2: lstrip_blocks: True
{% set keys = [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 or 'all' in key.hosts %}
{{- keys.append(key.name) -}}
{% endif %}
{% endfor %}
{% endif %}
{% for key in keys %}
{% if archusers_ssh_options is defined %}
{{ lookup('file', '../pubkeys/' + key) | regex_replace('(.*\S.*)', archusers_ssh_options + ' \\1') }}
{% else %}
{{ lookup('file', '../pubkeys/' + key) }}
{% endif %}
{% endfor %}