-
Notifications
You must be signed in to change notification settings - Fork 10
/
mail.yml
34 lines (29 loc) · 948 Bytes
/
mail.yml
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
# -*- eval: (ansible) -*-
- include: vault.yml load=users hosts=mail.hashbang.sh
- hosts: mail.hashbang.sh
become: true
tasks:
# # Does not work on CoreOS, due to the fucked up
# # Python install and lack of installable packages.
# - name: Start the ircd container
# docker_container:
# name: postfix
# state: started
- name: Generating aliases
template:
src: files/postfix/aliases.j2
dest: /home/core/postfix/config/aliases
notify: [rehash aliases]
- name: Copy static configuration
copy:
src: "{{ item }}"
dest: /home/core/postfix/config/{{ item | basename }}
with_fileglob:
- postfix/*.cf
notify: [reload config]
# Handlers are executed in the order they are written
handlers:
- name: rehash aliases
command: docker exec postfix newaliases
- name: reload config
command: docker exec postfix postfix reload