diff --git a/states/opendkim/config.sls b/states/opendkim/config.sls index 0c05eae..8fad2ee 100644 --- a/states/opendkim/config.sls +++ b/states/opendkim/config.sls @@ -10,7 +10,7 @@ opendkim-config-dir: opendkim-configuration-key: file.managed: - name: {{ opendkim.config.dir }}/{{ opendkim.config.key.name }} - - source: salt://opendkim/key.j2 + - source: salt://opendkim/templates/key.j2 - user: {{ opendkim.config.user }} - group: {{ opendkim.config.group }} - mode: 600 @@ -21,7 +21,7 @@ opendkim-configuration-key: opendkim-trusted-hosts: file.managed: - name: {{ opendkim.config.dir }}/TrustedHosts - - source: salt://opendkim/TrustedHosts.j2 + - source: salt://opendkim/templates/TrustedHosts.j2 - user: {{ opendkim.config.user }} - group: {{ opendkim.config.group }} - mode: 644 @@ -32,7 +32,7 @@ opendkim-trusted-hosts: opendkim-service-defaults: file.managed: - name: {{ opendkim.config.default_file }} - - source: salt://opendkim/service_defaults.j2 + - source: salt://opendkim/templates/service_defaults.j2 - user: {{ opendkim.config.user }} - group: {{ opendkim.config.group }} - mode: 644 @@ -43,7 +43,7 @@ opendkim-service-defaults: opendkim-config-file: file.managed: - name: {{ opendkim.config.file }} - - source: salt://opendkim/opendkim.conf.j2 + - source: salt://opendkim/templates/opendkim.conf.j2 - user: {{ opendkim.config.user }} - group: {{ opendkim.config.group }} - mode: 644 diff --git a/states/opendkim/defaults.yaml b/states/opendkim/defaults.yaml index 2b321d6..ef143c5 100644 --- a/states/opendkim/defaults.yaml +++ b/states/opendkim/defaults.yaml @@ -1,6 +1,9 @@ --- opendkim: enabled: true + pkgs: + - opendkim + - opendkim-tools config: dir: '/etc/opendkim' file: '/etc/opendkim.conf' diff --git a/states/opendkim/init.sls b/states/opendkim/init.sls index 1d21dcb..383c46b 100644 --- a/states/opendkim/init.sls +++ b/states/opendkim/init.sls @@ -1,5 +1,4 @@ --- -{%- from "opendkim/map.jinja" import opendkim with context %} include: - .install - .config diff --git a/states/opendkim/install.sls b/states/opendkim/install.sls index d43338b..13afcaa 100644 --- a/states/opendkim/install.sls +++ b/states/opendkim/install.sls @@ -2,6 +2,4 @@ {%- from "opendkim/map.jinja" import opendkim with context %} opendkim-pkg: pkg.installed: - - pkgs: - - opendkim - - opendkim-tools + - pkgs: {{ opendkim.pkgs }} diff --git a/states/opendkim/TrustedHosts.j2 b/states/opendkim/templates/TrustedHosts.j2 similarity index 100% rename from states/opendkim/TrustedHosts.j2 rename to states/opendkim/templates/TrustedHosts.j2 diff --git a/states/opendkim/key.j2 b/states/opendkim/templates/key.j2 similarity index 100% rename from states/opendkim/key.j2 rename to states/opendkim/templates/key.j2 diff --git a/states/opendkim/opendkim.conf.j2 b/states/opendkim/templates/opendkim.conf.j2 similarity index 100% rename from states/opendkim/opendkim.conf.j2 rename to states/opendkim/templates/opendkim.conf.j2 diff --git a/states/opendkim/service_defaults.j2 b/states/opendkim/templates/service_defaults.j2 similarity index 100% rename from states/opendkim/service_defaults.j2 rename to states/opendkim/templates/service_defaults.j2