Files
role_radicale/templates/users.htpasswd.j2
T
2026-11-08 17:46:06 +01:00

10 lines
331 B
Django/Jinja

# {{ ansible_managed }}
{% for user in radicale_users %}
{% if user.password is match('^\$(apr1|2[abxy]?|argon2(i|d|id)|5|6)\$') %}
{{ user.name }}:{{ user.password }}
{% else %}
{{ user.name }}:{{ user.password | password_hash('sha512', ((user.name ~ '@' ~ inventory_hostname) | hash('sha256'))[:16]) }}
{% endif %}
{% endfor %}