-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathplaybook-mail-servers.yaml
More file actions
59 lines (58 loc) · 1.7 KB
/
Copy pathplaybook-mail-servers.yaml
File metadata and controls
59 lines (58 loc) · 1.7 KB
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
---
- name: Mail (MX) Servers
hosts: mx_servers
handlers:
- name: restart postsrsd
ansible.builtin.service:
name: postsrsd
state: restarted
roles:
- role: galaxyproject.general.virtual
# postfix here to get the elastic IP
tags: [general, postfix]
when: "'amazon_ec2_hosts' in group_names"
# should be done by bootstrap now
#- role: galaxyproject.general.packages
# tags: general
#- role: galaxyproject.general.paths
# tags: general
#- role: galaxyproject.general.users
# tags: general
- role: galaxyproject.opendkim
tags: [postfix, opendkim]
- role: galaxyproject.postfix
tags: postfix
post_tasks:
- name: Add postfix user to opendkim group
user:
name: postfix
groups: opendkim
notify:
- restart postfix
tags: postfix
- name: Configure postsrsd domain
ansible.builtin.lineinfile:
path: /etc/default/postsrsd
regexp: '^SRS_DOMAIN=.*'
line: 'SRS_DOMAIN=galaxyproject.org'
notify:
- restart postsrsd
tags: postsrsd
- name: VM Hosting Block
when: "'psu_vmhosting_hosts' in group_names"
tags: vmhosting
block:
- name: Allow SMTP traffic in ufw
community.general.ufw:
#name: Postfix
#delete: true
rule: allow
direction: in
proto: tcp
from_ip: any
to_port: "25"
- name: Allow list user login from list server
ansible.builtin.lineinfile:
path: /etc/security/access.conf
line: "+ : list : {{ lookup('dig', groups.list_servers[0]) }}"
insertbefore: "- : ALL : ALL"