blob: 7a3268eb34d897c59b2a8f732a1a6d07aabdf192 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
- name: Configuration du démon
template: src=main.cf.j2 dest=/etc/postfix/main.cf
owner=root
group=root
mode=644
notify: restart postfix
- name: Configuration du master
copy: src=master.cf dest=/etc/postfix/master.cf
owner=root
group=root
mode=644
when: is_mtamaster is defined
notify: restart postfix
- name: Installation des tables dynamiques
template: src={{ item.name }} dest=/etc/postfix/{{ item.filename }}
owner=root
group=root
mode=644
notify: postmap
with_items:
- { name: 'mydestination_table.j2', filename: 'mydestination_table' }
- { name: 'network_table.j2', filename: 'network_table' }
- { name: 'relay_recipients.j2', filename: 'relay_recipients' }
- name: Installation des tables statiques
copy: src=virtual dest=/etc/postfix/virtual
owner=root
group=root
mode=644
when: is_mtamaster is defined
notify: virtualmap
- name: Configuration de l'alias root
lineinfile:
path: /etc/aliases
line: 'root: casper'
when: is_mtamaster is defined
notify: aliasmap
- name: Configuration de l'alias matthieu
lineinfile:
path: /etc/aliases
line: 'matthieu: casper'
when: is_mtamaster is defined
notify: aliasmap
- name: Ouverture du port SMTP
firewalld: service=smtp permanent={{ item }} state=enabled
with_items:
- true
- false
when: ansible_distribution == "Fedora" and mtamaster is defined
- name: Ouverture du port Submission
firewalld: service=smtp-submission permanent={{ item }} state=enabled
with_items:
- true
- false
when: ansible_distribution == "Fedora" and mtamaster is defined
|