46 lines
1.1 KiB
Plaintext
46 lines
1.1 KiB
Plaintext
---
|
|
{%- 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
|
|
- source: salt://postfix/templates/main.cf.j2
|
|
- user: root
|
|
- group: root
|
|
- mode: 644
|
|
- template: jinja
|
|
- watch_in:
|
|
- service: postfix-service
|
|
|
|
postfix-master-cf:
|
|
file.managed:
|
|
- name: {{ postfix.base_dir }}/master.cf
|
|
- source: salt://postfix/templates/master.cf.j2
|
|
- user: root
|
|
- group: root
|
|
- mode: 644
|
|
- template: jinja
|
|
- watch_in:
|
|
- service: postfix-service
|
|
|
|
{%- for key, value in postfix.config.pgsql.files.items() %}
|
|
postfix-pgsql-{{ key }}:
|
|
file.managed:
|
|
- name: {{ postfix.base_dir }}/pgsql/{{ key }}.cf
|
|
- source: salt://postfix/templates/pgsql.cf.j2
|
|
- user: root
|
|
- group: root
|
|
- mode: 644
|
|
- template: jinja
|
|
- context:
|
|
config: {{ postfix.config.pgsql.config }}
|
|
query: {{ value.query }}
|
|
- watch_in:
|
|
- service: postfix-service
|
|
{% endfor %}
|