paulbsd-salt/states/dovecot/config.sls
Paul Lecuq 78bd7aed87
All checks were successful
continuous-integration/drone/push Build is passing
updated dovecot state
2023-07-13 19:47:03 +02:00

36 lines
914 B
Plaintext

---
{%- from "dovecot/map.jinja" import dovecot with context %}
dovecot-imap-user:
user.present:
- name: {{ dovecot.imap_user }}
- uid: {{ dovecot.imap_user_id }}
{%- for name, config in dovecot.config.main.items() %}
dovecot-config-main-{{ name }}:
file.managed:
- name: {{ dovecot.config_dir }}/{{ name }}
- source: salt://dovecot/templates/config.j2
- template: jinja
- user: root
- group: root
- watch_in:
- service: dovecot-service
- context:
config: {{ config }}
{%- endfor %}
{%- for name, config in dovecot.config.confd.items() %}
dovecot-config-conf.d-{{ name }}:
file.managed:
- name: {{ dovecot.config_dir }}/conf.d/{{ name }}
- source: salt://dovecot/templates/config.j2
- template: jinja
- user: root
- group: root
- watch_in:
- service: dovecot-service
- context:
config: {{ config }}
{%- endfor %}