updated postfix state
This commit is contained in:
parent
8ba2dc88af
commit
0701722f5e
40
states/postfix/config.sls
Normal file
40
states/postfix/config.sls
Normal file
@ -0,0 +1,40 @@
|
||||
---
|
||||
{%- from "postfix/map.jinja" import postfix with context %}
|
||||
postfix-pgsql-dir:
|
||||
file.directory:
|
||||
- name: {{ postfix.base_dir }}/pgsql
|
||||
- user: root
|
||||
- group: root
|
||||
|
||||
postfix-main-cf:
|
||||
file.managed:
|
||||
- name: {{ postfix.base_dir }}/pgsql/main.cf
|
||||
- source: salt://postfix/templates/main.cf.j2
|
||||
- user: root
|
||||
- group: root
|
||||
- mode: 644
|
||||
- template: jinja
|
||||
- watch_in:
|
||||
- service: postfix-service
|
||||
|
||||
postfix-main-cf:
|
||||
file.managed:
|
||||
- name: {{ postfix.base_dir }}/main.cf
|
||||
- source: salt://postfix/templates/main.cf.j2
|
||||
- user: root
|
||||
- group: root
|
||||
- mode: 644
|
||||
- template: jinja
|
||||
- watch_in:
|
||||
- service: postfix-service
|
||||
|
||||
postfix-master-cf:
|
||||
file.managed:
|
||||
- name: {{ postfix.base_dir }}/master.cf
|
||||
- source: salt://postfix/templates/master.cf.j2
|
||||
- user: root
|
||||
- group: root
|
||||
- mode: 644
|
||||
- template: jinja
|
||||
- watch_in:
|
||||
- service: postfix-service
|
@ -2,6 +2,8 @@
|
||||
postfix:
|
||||
enabled: true
|
||||
base_dir: '/etc/postfix'
|
||||
pkgs:
|
||||
- postfix
|
||||
config:
|
||||
main:
|
||||
alias_database: 'hash:/etc/aliases'
|
||||
|
@ -1,73 +1,6 @@
|
||||
---
|
||||
{%- from "postfix/map.jinja" import postfix with context %}
|
||||
postfix-pkg:
|
||||
pkg.latest:
|
||||
- name: postfix
|
||||
|
||||
postfix-pgsql-dir:
|
||||
file.directory:
|
||||
- name: {{ postfix.base_dir }}/pgsql
|
||||
- user: root
|
||||
- group: root
|
||||
|
||||
postfix-main-cf:
|
||||
file.managed:
|
||||
- name: {{ postfix.base_dir }}/main.cf
|
||||
- source: salt://postfix/main.cf.j2
|
||||
- user: root
|
||||
- group: root
|
||||
- mode: 644
|
||||
- template: jinja
|
||||
- watch_in:
|
||||
- service: postfix-service
|
||||
|
||||
postfix-master-cf:
|
||||
file.managed:
|
||||
- name: {{ postfix.base_dir }}/master.cf
|
||||
- source: salt://postfix/master.cf.j2
|
||||
- user: root
|
||||
- group: root
|
||||
- mode: 644
|
||||
- template: jinja
|
||||
- watch_in:
|
||||
- service: postfix-service
|
||||
|
||||
postfix-transport-maps:
|
||||
file.managed:
|
||||
- name: {{ postfix.base_dir }}/transport
|
||||
- source: salt://postfix/transport.j2
|
||||
- user: root
|
||||
- group: root
|
||||
- mode: 644
|
||||
- template: jinja
|
||||
- watch_in:
|
||||
- service: postfix-service
|
||||
- cmd: postfix-transport
|
||||
|
||||
postfix-sender-access-maps:
|
||||
file.managed:
|
||||
- name: {{ postfix.base_dir }}/sender_access
|
||||
- source: salt://postfix/sender_access.j2
|
||||
- user: root
|
||||
- group: root
|
||||
- mode: 644
|
||||
- template: jinja
|
||||
- watch_in:
|
||||
- service: postfix-service
|
||||
- cmd: postfix-sender-access
|
||||
|
||||
postfix-transport:
|
||||
cmd.run:
|
||||
- name: postmap transport
|
||||
- cwd: {{ postfix.base_dir }}
|
||||
|
||||
postfix-sender-access:
|
||||
cmd.run:
|
||||
- name: postmap sender_access
|
||||
- cwd: {{ postfix.base_dir }}
|
||||
|
||||
postfix-service:
|
||||
service.running:
|
||||
- name: postfix
|
||||
- enable: True
|
||||
- reload: True
|
||||
include:
|
||||
- .install
|
||||
- .config
|
||||
- .maps
|
||||
- .service
|
5
states/postfix/install.sls
Normal file
5
states/postfix/install.sls
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
{%- from "postfix/map.jinja" import postfix with context %}
|
||||
postfix-pkg:
|
||||
pkg.latest:
|
||||
- pkgs: {{ postfix.pkgs }}
|
35
states/postfix/maps.sls
Normal file
35
states/postfix/maps.sls
Normal file
@ -0,0 +1,35 @@
|
||||
---
|
||||
{%- from "postfix/map.jinja" import postfix with context %}
|
||||
postfix-transport-maps:
|
||||
file.managed:
|
||||
- name: {{ postfix.base_dir }}/transport
|
||||
- source: salt://postfix/templates/transport.j2
|
||||
- user: root
|
||||
- group: root
|
||||
- mode: 644
|
||||
- template: jinja
|
||||
- watch_in:
|
||||
- service: postfix-service
|
||||
- cmd: postfix-transport
|
||||
|
||||
postfix-sender-access-maps:
|
||||
file.managed:
|
||||
- name: {{ postfix.base_dir }}/sender_access
|
||||
- source: salt://postfix/templates/sender_access.j2
|
||||
- user: root
|
||||
- group: root
|
||||
- mode: 644
|
||||
- template: jinja
|
||||
- watch_in:
|
||||
- service: postfix-service
|
||||
- cmd: postfix-sender-access
|
||||
|
||||
postfix-transport:
|
||||
cmd.run:
|
||||
- name: postmap transport
|
||||
- cwd: {{ postfix.base_dir }}
|
||||
|
||||
postfix-sender-access:
|
||||
cmd.run:
|
||||
- name: postmap sender_access
|
||||
- cwd: {{ postfix.base_dir }}
|
7
states/postfix/service.sls
Normal file
7
states/postfix/service.sls
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
{%- from "postfix/map.jinja" import postfix with context %}
|
||||
postfix-service:
|
||||
service.running:
|
||||
- name: postfix
|
||||
- enable: True
|
||||
- reload: True
|
Loading…
Reference in New Issue
Block a user