diff options
author | Georg Pfuetzenreuter | 2023-01-24 21:26:04 +0100 |
---|---|---|
committer | Georg Pfuetzenreuter | 2023-01-24 21:26:04 +0100 |
commit | d83eb08f484219acbc375389d42e57b3da440ed9 (patch) | |
tree | 686376ed4b83c3d8c3b7d7323d8016d14123cfc2 | |
parent | 2698d18625246773601855c5be1d1abebc706e8a (diff) | |
parent | 70036d224feb0cc73c61982aa284f77c9ad68904 (diff) | |
download | salt-d83eb08f484219acbc375389d42e57b3da440ed9.tar.gz salt-d83eb08f484219acbc375389d42e57b3da440ed9.tar.bz2 salt-d83eb08f484219acbc375389d42e57b3da440ed9.zip |
Merge pull request 'Manage global Postfix'es + make common pillar OS based' (#2) from postfix into production
Reviewed-on: https://git.com.de/LibertaCasa/salt/pulls/2
-rwxr-xr-x | bin/prepare_minion.py | 1 | ||||
-rw-r--r-- | pillar/common/init.sls (renamed from pillar/common.sls) | 6 | ||||
-rw-r--r-- | pillar/common/postfix.sls | 26 | ||||
-rw-r--r-- | pillar/common/suse.sls | 6 | ||||
-rw-r--r-- | pillar/role/salt/master.sls | 2 | ||||
-rw-r--r-- | salt/common/postfix.sls | 3 | ||||
-rw-r--r-- | salt/common/suse.sls | 1 |
7 files changed, 39 insertions, 6 deletions
diff --git a/bin/prepare_minion.py b/bin/prepare_minion.py index 7bddba1..a1f15bd 100755 --- a/bin/prepare_minion.py +++ b/bin/prepare_minion.py @@ -28,6 +28,7 @@ file_roots: - /srv/salt - /srv/formulas/salt-formula - /srv/formulas/users-formula + - /srv/formulas/postfix-formula ''') os.symlink(mypwd + '/salt', '/srv/salt') diff --git a/pillar/common.sls b/pillar/common/init.sls index d423f73..7665aa6 100644 --- a/pillar/common.sls +++ b/pillar/common/init.sls @@ -1,12 +1,8 @@ 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 - -{%- if grains['os'] == 'SUSE' %} -zypper: - refreshdb_force: False -{%- endif %} diff --git a/pillar/common/postfix.sls b/pillar/common/postfix.sls new file mode 100644 index 0000000..15c3d07 --- /dev/null +++ b/pillar/common/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/pillar/common/suse.sls b/pillar/common/suse.sls new file mode 100644 index 0000000..f3456ed --- /dev/null +++ b/pillar/common/suse.sls @@ -0,0 +1,6 @@ +include: + - .postfix + +zypper: + refreshdb_force: False + diff --git a/pillar/role/salt/master.sls b/pillar/role/salt/master.sls index b306637..cafd05d 100644 --- a/pillar/role/salt/master.sls +++ b/pillar/role/salt/master.sls @@ -1,4 +1,4 @@ -{%- set formulas = ['salt', 'users'] -%} +{%- set formulas = ['salt', 'users', 'postfix'] -%} salt: interface: ${'secret_salt:master:interface'} diff --git a/salt/common/postfix.sls b/salt/common/postfix.sls new file mode 100644 index 0000000..d5b51d4 --- /dev/null +++ b/salt/common/postfix.sls @@ -0,0 +1,3 @@ +include: + - postfix + - postfix.config diff --git a/salt/common/suse.sls b/salt/common/suse.sls index e655353..d76da87 100644 --- a/salt/common/suse.sls +++ b/salt/common/suse.sls @@ -3,6 +3,7 @@ include: - profile.zypp - profile.node_exporter - users + - .postfix {#- to-do: move this to some formula or macro -#} {%- set osfullname = grains['osfullname'] -%} |