From 7b9f184c6b0e6164cfc08b5ae4b77970cc001194 Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter Date: Tue, 24 Jan 2023 23:03:20 +0100 Subject: Revert "Split to OS specific common pillar" This reverts commit 4863396938c7c638517cbefc3a2773c9eb29bc69. --- pillar/common.sls | 12 ++++++++++++ pillar/common/init.sls | 8 -------- pillar/common/postfix.sls | 26 -------------------------- pillar/common/suse.sls | 6 ------ pillar/postfix.sls | 26 ++++++++++++++++++++++++++ 5 files changed, 38 insertions(+), 40 deletions(-) create mode 100644 pillar/common.sls delete mode 100644 pillar/common/init.sls delete mode 100644 pillar/common/postfix.sls delete mode 100644 pillar/common/suse.sls create mode 100644 pillar/postfix.sls diff --git a/pillar/common.sls b/pillar/common.sls new file mode 100644 index 0000000..d423f73 --- /dev/null +++ b/pillar/common.sls @@ -0,0 +1,12 @@ +include: + - role.salt.common + - role.salt.minion + +managed_header_pound: | + ### This file is managed via https://git.com.de/LibertaCasa/salt + ### Manual changes will be overwritten + +{%- if grains['os'] == 'SUSE' %} +zypper: + refreshdb_force: False +{%- endif %} diff --git a/pillar/common/init.sls b/pillar/common/init.sls deleted file mode 100644 index 7665aa6..0000000 --- a/pillar/common/init.sls +++ /dev/null @@ -1,8 +0,0 @@ -include: - - role.salt.common - - role.salt.minion - - common.{{ grains['os'] | lower }} - -managed_header_pound: | - ### This file is managed via https://git.com.de/LibertaCasa/salt - ### Manual changes will be overwritten diff --git a/pillar/common/postfix.sls b/pillar/common/postfix.sls deleted file mode 100644 index 15c3d07..0000000 --- a/pillar/common/postfix.sls +++ /dev/null @@ -1,26 +0,0 @@ -postfix: - master_config: - services: - smtp: - enable: False - config: - # to-do: set via site config - relayhost: zz0.email - myhostname: {{ grains['fqdn'] }} - inet_interfaces: loopback-only - # to-do: support relay via IPv6 - inet_protocols: ipv4 - alias_maps: lmdb:/etc/aliases - smtpd_use_tls: 'no' - smtp_use_tls: 'yes' - smtp_tls_security_level: encrypt - smtp_tls_wrappermode: 'yes' - - aliases: - use_file: false - present: - admins: 'georg, pratyush' - georg: georg@lysergic.dev - pratyush: pratyush@lysergic.dev - root: 'system, \root' - system: system@lysergic.dev diff --git a/pillar/common/suse.sls b/pillar/common/suse.sls deleted file mode 100644 index f3456ed..0000000 --- a/pillar/common/suse.sls +++ /dev/null @@ -1,6 +0,0 @@ -include: - - .postfix - -zypper: - refreshdb_force: False - diff --git a/pillar/postfix.sls b/pillar/postfix.sls new file mode 100644 index 0000000..15c3d07 --- /dev/null +++ b/pillar/postfix.sls @@ -0,0 +1,26 @@ +postfix: + master_config: + services: + smtp: + enable: False + config: + # to-do: set via site config + relayhost: zz0.email + myhostname: {{ grains['fqdn'] }} + inet_interfaces: loopback-only + # to-do: support relay via IPv6 + inet_protocols: ipv4 + alias_maps: lmdb:/etc/aliases + smtpd_use_tls: 'no' + smtp_use_tls: 'yes' + smtp_tls_security_level: encrypt + smtp_tls_wrappermode: 'yes' + + aliases: + use_file: false + present: + admins: 'georg, pratyush' + georg: georg@lysergic.dev + pratyush: pratyush@lysergic.dev + root: 'system, \root' + system: system@lysergic.dev -- cgit v1.2.3 From 4bf9ac9413b0ab5668abd9a77c9be745b5bee136 Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter Date: Tue, 24 Jan 2023 23:04:57 +0100 Subject: Include Postfix pillar via role Signed-off-by: Georg Pfuetzenreuter --- pillar/common.sls | 1 + pillar/postfix.sls | 26 -------------------------- pillar/role/mta/postfix.sls | 26 ++++++++++++++++++++++++++ salt/common/postfix.sls | 3 --- salt/common/suse.sls | 2 +- salt/role/mta/postfix.sls | 3 +++ 6 files changed, 31 insertions(+), 30 deletions(-) delete mode 100644 pillar/postfix.sls create mode 100644 pillar/role/mta/postfix.sls delete mode 100644 salt/common/postfix.sls create mode 100644 salt/role/mta/postfix.sls diff --git a/pillar/common.sls b/pillar/common.sls index d423f73..280886f 100644 --- a/pillar/common.sls +++ b/pillar/common.sls @@ -1,6 +1,7 @@ include: - role.salt.common - role.salt.minion + - role.mta.postfix managed_header_pound: | ### This file is managed via https://git.com.de/LibertaCasa/salt diff --git a/pillar/postfix.sls b/pillar/postfix.sls deleted file mode 100644 index 15c3d07..0000000 --- a/pillar/postfix.sls +++ /dev/null @@ -1,26 +0,0 @@ -postfix: - master_config: - services: - smtp: - enable: False - config: - # to-do: set via site config - relayhost: zz0.email - myhostname: {{ grains['fqdn'] }} - inet_interfaces: loopback-only - # to-do: support relay via IPv6 - inet_protocols: ipv4 - alias_maps: lmdb:/etc/aliases - smtpd_use_tls: 'no' - smtp_use_tls: 'yes' - smtp_tls_security_level: encrypt - smtp_tls_wrappermode: 'yes' - - aliases: - use_file: false - present: - admins: 'georg, pratyush' - georg: georg@lysergic.dev - pratyush: pratyush@lysergic.dev - root: 'system, \root' - system: system@lysergic.dev diff --git a/pillar/role/mta/postfix.sls b/pillar/role/mta/postfix.sls new file mode 100644 index 0000000..15c3d07 --- /dev/null +++ b/pillar/role/mta/postfix.sls @@ -0,0 +1,26 @@ +postfix: + master_config: + services: + smtp: + enable: False + config: + # to-do: set via site config + relayhost: zz0.email + myhostname: {{ grains['fqdn'] }} + inet_interfaces: loopback-only + # to-do: support relay via IPv6 + inet_protocols: ipv4 + alias_maps: lmdb:/etc/aliases + smtpd_use_tls: 'no' + smtp_use_tls: 'yes' + smtp_tls_security_level: encrypt + smtp_tls_wrappermode: 'yes' + + aliases: + use_file: false + present: + admins: 'georg, pratyush' + georg: georg@lysergic.dev + pratyush: pratyush@lysergic.dev + root: 'system, \root' + system: system@lysergic.dev diff --git a/salt/common/postfix.sls b/salt/common/postfix.sls deleted file mode 100644 index d5b51d4..0000000 --- a/salt/common/postfix.sls +++ /dev/null @@ -1,3 +0,0 @@ -include: - - postfix - - postfix.config diff --git a/salt/common/suse.sls b/salt/common/suse.sls index d76da87..d4cd6a1 100644 --- a/salt/common/suse.sls +++ b/salt/common/suse.sls @@ -3,7 +3,7 @@ include: - profile.zypp - profile.node_exporter - users - - .postfix + - role.mta.postfix {#- to-do: move this to some formula or macro -#} {%- set osfullname = grains['osfullname'] -%} diff --git a/salt/role/mta/postfix.sls b/salt/role/mta/postfix.sls new file mode 100644 index 0000000..d5b51d4 --- /dev/null +++ b/salt/role/mta/postfix.sls @@ -0,0 +1,3 @@ +include: + - postfix + - postfix.config -- cgit v1.2.3