Simplify postfix package handling
It is only one package for all listed distributions.
This commit is contained in:
parent
187c0945c2
commit
197c85bc1c
@ -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:
|
||||
|
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user