postfixadmin: make setup password hash idempotent
This commit is contained in:
parent
9d548202bc
commit
cae3a6de60
1 changed files with 5 additions and 2 deletions
|
@ -1,10 +1,13 @@
|
|||
<?php
|
||||
|
||||
{{ ansible_managed | comment(decoration='// ') }}
|
||||
{% set _salt = inventory_hostname | hash("sha512") | regex_replace("^(.{22}).*$", "\1") %}
|
||||
|
||||
$CONF['configured'] = true;
|
||||
$CONF['setup_password'] = '{{ postfixadmin_setup_password | password_hash("bcrypt", _salt) }}';
|
||||
{% if postfixadmin_setup_password_salt is defined %}
|
||||
$CONF['setup_password'] = '{{ postfixadmin_setup_password | password_hash("bcrypt", postfixadmin_setup_password_salt) }}';
|
||||
{% else %}
|
||||
$CONF['setup_password'] = '{{ postfixadmin_setup_password | password_hash("bcrypt") }}';
|
||||
{% endif %}
|
||||
|
||||
$CONF['default_language'] = '{{ postfixadmin_default_language }}';
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue