Add option to let the module (not) manage the master.cf

This commit is contained in:
jeroen92 2015-03-25 12:49:57 +01:00
parent 71b5c142d5
commit 493298fff1
3 changed files with 23 additions and 21 deletions

View File

@ -1,4 +1,6 @@
postfix:
manage_master_config: True
config:
smtpd_banner: $myhostname ESMTP $mail_name
biff: 'no'

View File

@ -20,7 +20,7 @@ include:
- watch_in:
- service: postfix
- template: jinja
{% if salt['pillar.get']('postfix:manage_master_config', True) == True %}
/etc/postfix/master.cf:
file.managed:
- source: salt://postfix/files/master.cf
@ -32,4 +32,4 @@ include:
- watch_in:
- service: postfix
- template: jinja
{% endif %}

View File

@ -1,4 +1,4 @@
{% set config = salt['pillar.get']('postfix', {}) -%}
{% set config = salt['pillar.get']('postfix:config', {}) -%}
{% set processed_parameters = ['aliases', 'virtual'] -%}
{% macro set_parameter(parameter, default=None) -%}
{% set value = config.get(parameter, default) -%}