paulbsd-salt/states/opendkim/config.sls

53 lines
1.5 KiB
Plaintext

---
{%- from "opendkim/map.jinja" import opendkim with context %}
opendkim-config-dir:
file.directory:
- name: {{ opendkim.config.dir }}
- user: {{ opendkim.config.user }}
- group: {{ opendkim.config.group }}
- mode: 755
opendkim-configuration-key:
file.managed:
- name: {{ opendkim.config.dir }}/{{ opendkim.config.key.name }}
- source: salt://opendkim/templates/key.j2
- user: {{ opendkim.config.user }}
- group: {{ opendkim.config.group }}
- mode: 600
- template: jinja
- watch_in:
- service: opendkim-service
opendkim-trusted-hosts:
file.managed:
- name: {{ opendkim.config.dir }}/TrustedHosts
- source: salt://opendkim/templates/TrustedHosts.j2
- user: {{ opendkim.config.user }}
- group: {{ opendkim.config.group }}
- mode: 644
- template: jinja
- watch_in:
- service: opendkim-service
opendkim-service-defaults:
file.managed:
- name: {{ opendkim.config.default_file }}
- source: salt://opendkim/templates/service_defaults.j2
- user: {{ opendkim.config.user }}
- group: {{ opendkim.config.group }}
- mode: 644
- template: jinja
- watch_in:
- service: opendkim-service
opendkim-config-file:
file.managed:
- name: {{ opendkim.config.file }}
- source: salt://opendkim/templates/opendkim.conf.j2
- user: {{ opendkim.config.user }}
- group: {{ opendkim.config.group }}
- mode: 644
- template: jinja
- watch_in:
- service: opendkim-service