summaryrefslogtreecommitdiffstats
path: root/handlers
diff options
context:
space:
mode:
Diffstat (limited to 'handlers')
-rw-r--r--handlers/main.yml30
1 files changed, 30 insertions, 0 deletions
diff --git a/handlers/main.yml b/handlers/main.yml
new file mode 100644
index 0000000..d3d7755
--- /dev/null
+++ b/handlers/main.yml
@@ -0,0 +1,30 @@
+# '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: Update initramfs
+ command: /usr/sbin/update-initramfs -u