postfixadmin: make setup password hash idempotent

This commit is contained in:
s3lph 2021-11-03 00:22:21 +01:00
parent 22b9984607
commit 9d548202bc

View file

@ -1,7 +1,7 @@
<?php
{{ ansible_managed | comment(decoration='// ') }}
{% set _salt = inventory_hostname | | hash("sha512") | regex_replace("^(.{22}).*$", "\1") %}
{% set _salt = inventory_hostname | hash("sha512") | regex_replace("^(.{22}).*$", "\1") %}
$CONF['configured'] = true;
$CONF['setup_password'] = '{{ postfixadmin_setup_password | password_hash("bcrypt", _salt) }}';