From 813f71d99d0c1e5f1c88972db710c07f2871e149 Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Wed, 4 Jan 2023 21:54:52 +0100 Subject: [PATCH] updated opendkim state --- states/opendkim/{templates => }/TrustedHosts.j2 | 0 states/opendkim/config.sls | 8 ++++---- states/opendkim/defaults.yaml | 3 --- states/opendkim/init.sls | 1 + states/opendkim/install.sls | 4 +++- states/opendkim/{templates => }/key.j2 | 0 states/opendkim/{templates => }/opendkim.conf.j2 | 0 states/opendkim/{templates => }/service_defaults.j2 | 0 8 files changed, 8 insertions(+), 8 deletions(-) rename states/opendkim/{templates => }/TrustedHosts.j2 (100%) rename states/opendkim/{templates => }/key.j2 (100%) rename states/opendkim/{templates => }/opendkim.conf.j2 (100%) rename states/opendkim/{templates => }/service_defaults.j2 (100%) diff --git a/states/opendkim/templates/TrustedHosts.j2 b/states/opendkim/TrustedHosts.j2 similarity index 100% rename from states/opendkim/templates/TrustedHosts.j2 rename to states/opendkim/TrustedHosts.j2 diff --git a/states/opendkim/config.sls b/states/opendkim/config.sls index 8fad2ee..0c05eae 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/templates/key.j2 + - source: salt://opendkim/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/templates/TrustedHosts.j2 + - source: salt://opendkim/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/templates/service_defaults.j2 + - source: salt://opendkim/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/templates/opendkim.conf.j2 + - source: salt://opendkim/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 ef143c5..2b321d6 100644 --- a/states/opendkim/defaults.yaml +++ b/states/opendkim/defaults.yaml @@ -1,9 +1,6 @@ --- 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 383c46b..1d21dcb 100644 --- a/states/opendkim/init.sls +++ b/states/opendkim/init.sls @@ -1,4 +1,5 @@ --- +{%- from "opendkim/map.jinja" import opendkim with context %} include: - .install - .config diff --git a/states/opendkim/install.sls b/states/opendkim/install.sls index 13afcaa..d43338b 100644 --- a/states/opendkim/install.sls +++ b/states/opendkim/install.sls @@ -2,4 +2,6 @@ {%- from "opendkim/map.jinja" import opendkim with context %} opendkim-pkg: pkg.installed: - - pkgs: {{ opendkim.pkgs }} + - pkgs: + - opendkim + - opendkim-tools diff --git a/states/opendkim/templates/key.j2 b/states/opendkim/key.j2 similarity index 100% rename from states/opendkim/templates/key.j2 rename to states/opendkim/key.j2 diff --git a/states/opendkim/templates/opendkim.conf.j2 b/states/opendkim/opendkim.conf.j2 similarity index 100% rename from states/opendkim/templates/opendkim.conf.j2 rename to states/opendkim/opendkim.conf.j2 diff --git a/states/opendkim/templates/service_defaults.j2 b/states/opendkim/service_defaults.j2 similarity index 100% rename from states/opendkim/templates/service_defaults.j2 rename to states/opendkim/service_defaults.j2