Run postmap on a specific set of file types
According to postfix documentation [1], only some types of file require running postmap, others must be left alone. See github issue #50. [1] http://www.postfix.org/postmap.1.html
This commit is contained in:
parent
d75184a7d1
commit
7ce8798709
@ -37,8 +37,10 @@ run-newaliases:
|
|||||||
{%- set need_postmap = False %}
|
{%- set need_postmap = False %}
|
||||||
{%- set file_path = salt['pillar.get']('postfix:config:' ~ mapping) %}
|
{%- set file_path = salt['pillar.get']('postfix:config:' ~ mapping) %}
|
||||||
{%- if ':' in file_path %}
|
{%- if ':' in file_path %}
|
||||||
{%- set file_path = file_path.split(':')[1] %}
|
{%- set file_type, file_path = file_path.split(':') %}
|
||||||
{%- set need_postmap = True %}
|
{%- if file_type in ("btree", "cdb", "dbm", "hash", "sdbm") %}
|
||||||
|
{%- set need_postmap = True %}
|
||||||
|
{%- endif %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
postfix_{{ mapping }}:
|
postfix_{{ mapping }}:
|
||||||
file.managed:
|
file.managed:
|
||||||
|
Loading…
Reference in New Issue
Block a user