Simplify postfix package handling

It is only one package for all listed distributions.
This commit is contained in:
Gilles Dartiguelongue 2015-08-22 12:46:35 +02:00
parent 187c0945c2
commit 197c85bc1c
2 changed files with 5 additions and 10 deletions

View File

@ -1,15 +1,10 @@
{% from "postfix/map.jinja" import postfix with context %}
postfix:
{% if postfix.packages is defined %}
pkg.installed:
- names:
{% for name in postfix.packages %}
- {{ name }}
{% endfor %}
- name: {{ postfix.package }}
- watch_in:
- service: postfix
{% endif %}
service.running:
- enable: True
- require:

View File

@ -1,24 +1,24 @@
{% set postfix = salt['grains.filter_by']({
'Debian': {
'packages': ['postfix'],
'package': 'postfix',
'postgrey_pkg': 'postgrey',
'service': 'postfix',
'aliases': '/etc/aliases',
},
'Gentoo': {
'packages': ['mail-mta/postfix'],
'package': 'mail-mta/postfix',
'postgrey_pkg': 'mail-filter/postgrey',
'service': 'postfix',
'aliases': '/etc/mail/aliases',
},
'RedHat': {
'packages': ['postfix'],
'package': 'postfix',
'postgrey_pkg': 'postgrey',
'service': 'postfix',
'aliases': '/etc/aliases',
},
'Arch' : {
'packages': ['postfix'],
'package': 'postfix',
'postgrey_pkg': 'postgrey',
'service': 'postfix',
'aliases': '/etc/aliases',