separate postgrey into a separate module

This commit is contained in:
Imran Haider 2015-07-11 05:31:11 -04:00
parent 0e3d0778bd
commit 1792b58851
2 changed files with 20 additions and 1 deletions

View File

@ -1,18 +1,22 @@
{% set postfix = salt['grains.filter_by']({ {% set postfix = salt['grains.filter_by']({
'Debian': { 'Debian': {
'packages': ['postfix', 'postfix-policyd-spf-python'], 'packages': ['postfix', 'postfix-policyd-spf-python'],
'postgrey_pkg': 'postgrey',
'service': 'postfix', 'service': 'postfix',
}, },
'Gentoo': { 'Gentoo': {
'packages': ['mail-mta/postfix'], 'packages': ['mail-mta/postfix'],
'postgrey_pkg': 'postgrey',
'service': 'postfix', 'service': 'postfix',
}, },
'RedHat': { 'RedHat': {
'packages': ['postfix'], 'packages': ['postfix'],
'postgrey_pkg': 'postgrey',
'service': 'postfix', 'service': 'postfix',
}, },
'Arch' : { 'Arch' : {
'packages': ['postfix', 'postgrey'], 'packages': ['postfix'],
'postgrey_pkg': 'postgrey',
'service': 'postfix', 'service': 'postfix',
}, },
}, merge=salt['pillar.get']('postfix:lookup')) %} }, merge=salt['pillar.get']('postfix:lookup')) %}

15
postfix/postgrey.sls Normal file
View File

@ -0,0 +1,15 @@
{% from "postfix/map.jinja" import postfix with context %}
postgrey:
pkg.installed:
- name: {{ postfix.postgrey_pkg }}
- watch_in:
- service: postgrey
service.running:
- enable: True
- require:
- pkg: postgrey
- watch:
- pkg: postgrey