updated postfix state

This commit is contained in:
Paul 2020-07-30 14:07:11 +02:00
parent bd3fa82ffa
commit efacdce925
2 changed files with 10 additions and 7 deletions

View File

@ -1,11 +1,5 @@
---
{%- from "postfix/map.jinja" import postfix with context %}
postfix-pgsql-dir:
file.directory:
- name: {{ postfix.base_dir }}/pgsql
- user: root
- group: root
postfix-main-cf:
file.managed:
- name: {{ postfix.base_dir }}/main.cf
@ -28,6 +22,13 @@ postfix-master-cf:
- watch_in:
- service: postfix-service
{%- if postfix.db == 'pgsql' %}
postfix-pgsql-dir:
file.directory:
- name: {{ postfix.base_dir }}/pgsql
- user: root
- group: root
{%- for key, value in postfix.config.pgsql.files.items() %}
postfix-pgsql-{{ key }}:
file.managed:
@ -43,3 +44,4 @@ postfix-pgsql-{{ key }}:
- watch_in:
- service: postfix-service
{% endfor %}
{%- endif %}

View File

@ -4,6 +4,7 @@ postfix:
base_dir: '/etc/postfix'
pkgs:
- postfix
db: None
config:
main:
alias_database: 'hash:/etc/aliases'
@ -46,4 +47,4 @@ postfix:
master: {}
sender_access: {}
transport: {}
pgsql: {}
pgsql: {}