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 %}
|
{% from "postfix/map.jinja" import postfix with context %}
|
||||||
|
|
||||||
postfix:
|
postfix:
|
||||||
{% if postfix.packages is defined %}
|
|
||||||
pkg.installed:
|
pkg.installed:
|
||||||
- names:
|
- name: {{ postfix.package }}
|
||||||
{% for name in postfix.packages %}
|
|
||||||
- {{ name }}
|
|
||||||
{% endfor %}
|
|
||||||
- watch_in:
|
- watch_in:
|
||||||
- service: postfix
|
- service: postfix
|
||||||
{% endif %}
|
|
||||||
service.running:
|
service.running:
|
||||||
- enable: True
|
- enable: True
|
||||||
- require:
|
- require:
|
||||||
|
@ -1,24 +1,24 @@
|
|||||||
{% set postfix = salt['grains.filter_by']({
|
{% set postfix = salt['grains.filter_by']({
|
||||||
'Debian': {
|
'Debian': {
|
||||||
'packages': ['postfix'],
|
'package': 'postfix',
|
||||||
'postgrey_pkg': 'postgrey',
|
'postgrey_pkg': 'postgrey',
|
||||||
'service': 'postfix',
|
'service': 'postfix',
|
||||||
'aliases': '/etc/aliases',
|
'aliases': '/etc/aliases',
|
||||||
},
|
},
|
||||||
'Gentoo': {
|
'Gentoo': {
|
||||||
'packages': ['mail-mta/postfix'],
|
'package': 'mail-mta/postfix',
|
||||||
'postgrey_pkg': 'mail-filter/postgrey',
|
'postgrey_pkg': 'mail-filter/postgrey',
|
||||||
'service': 'postfix',
|
'service': 'postfix',
|
||||||
'aliases': '/etc/mail/aliases',
|
'aliases': '/etc/mail/aliases',
|
||||||
},
|
},
|
||||||
'RedHat': {
|
'RedHat': {
|
||||||
'packages': ['postfix'],
|
'package': 'postfix',
|
||||||
'postgrey_pkg': 'postgrey',
|
'postgrey_pkg': 'postgrey',
|
||||||
'service': 'postfix',
|
'service': 'postfix',
|
||||||
'aliases': '/etc/aliases',
|
'aliases': '/etc/aliases',
|
||||||
},
|
},
|
||||||
'Arch' : {
|
'Arch' : {
|
||||||
'packages': ['postfix'],
|
'package': 'postfix',
|
||||||
'postgrey_pkg': 'postgrey',
|
'postgrey_pkg': 'postgrey',
|
||||||
'service': 'postfix',
|
'service': 'postfix',
|
||||||
'aliases': '/etc/aliases',
|
'aliases': '/etc/aliases',
|
||||||
|
Loading…
Reference in New Issue
Block a user