summaryrefslogtreecommitdiffstats
path: root/handlers/main.yml
blob: c241ecce47c7dae4ce629513d342f35619a5b092 (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
# 'service: name=... state=started' tasks should NOT run if there is a
# corresponding state=restarted handler.  (Register the task notifying
# the handler, and add a conditional.)
---
- name: systemctl daemon-reload
  command: /usr/bin/systemctl daemon-reload

- name: Refresh hostname
  command: /usr/bin/hostnamectl hostname {{ inventory_hostname_short }}

- name: apt-get update
  apt: update_cache=yes

- name: Restart nftables
  service: name=nftables.service state=restarted

- name: Restart systemd-networkd
  service: name=systemd-networkd.service state=restarted

- name: Restart systemd-resolved
  service: name=systemd-resolved.service state=restarted

- name: Restart systemd-timesyncd
  service: name=systemd-timesyncd.service state=restarted

- name: Restart OpenSSH
  service: name=ssh.service state=restarted

- name: Restart Postfix
  service: name=postfix.service state=restarted

- name: Reload Postfix
  service: name=postfix.service state=reloaded

- name: Run newaliases
  command: /usr/bin/newaliases

- name: Compile /etc/postfix/tls_policy
  command: /usr/sbin/postmap /etc/postfix/tls_policy

- name: Update initramfs
  command: /usr/sbin/update-initramfs -u

- name: Restart nginx
  service: name=nginx.service state=restarted

- name: Reload nginx
  service: name=nginx.service state=reloaded