43 lines
1.0 KiB
Plaintext
43 lines
1.0 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 }}/pgsql/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.items() %}
|
|
postfix-pgsql-{{ key }}:
|
|
file.managed:
|
|
- name: {{ postfix.base_dir }}/pgsql/{{ key }}.cf
|
|
- source: salt://postfix/templates/plain.cf.j2
|
|
- user: root
|
|
- group: root
|
|
- mode: 644
|
|
- template: jinja
|
|
- context: {{ value }}
|
|
- watch_in:
|
|
- service: postfix-service
|
|
{% endfor %} |