manage relay_domains file from pillar
This commit is contained in:
parent
99d7f9b6fd
commit
8c4c5e7a0a
@ -9,6 +9,9 @@ postfix:
|
||||
- someuser_2@example.com
|
||||
singlealiasexample: 'someuser_3@example.com'
|
||||
|
||||
relay_domains:
|
||||
example.com: 'OK'
|
||||
|
||||
sasl_passwd:
|
||||
smtp.example.com: 'somepassword'
|
||||
|
||||
|
@ -56,6 +56,11 @@ run-newaliases:
|
||||
{{ postmap_file('virtual') }}
|
||||
{% endif %}
|
||||
|
||||
# manage /etc/postfix/relay_domains if data found in pillar
|
||||
{% if 'relay_domains' in pillar.get('postfix', '') %}
|
||||
{{ postmap_file('relay_domains') }}
|
||||
{% endif %}
|
||||
|
||||
# manage /etc/postfix/sasl_passwd if data found in pillar
|
||||
{% if 'sasl_passwd' in pillar.get('postfix', '') %}
|
||||
{{ postmap_file('sasl_passwd', 600) }}
|
||||
|
7
postfix/relay_domains
Normal file
7
postfix/relay_domains
Normal file
@ -0,0 +1,7 @@
|
||||
# Managed by config management
|
||||
{% set canonical = salt['pillar.get']('postfix:relay_domains',{}) -%}
|
||||
{% if canonical is iterable -%}
|
||||
{% for key,value in salt['pillar.get']('postfix:relay_domains',{}).iteritems() -%}
|
||||
{{ key }} {{ value }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
Loading…
Reference in New Issue
Block a user