summaryrefslogtreecommitdiffstats
path: root/handlers
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2024-01-04 12:59:39 +0100
committerGuilhem Moulin <guilhem@fripost.org>2024-01-04 13:42:18 +0100
commit6691410f945719e62601c3d69d9b2ff9c4cfb4fb (patch)
tree9ea4170a6d5d50ac14a326f42fa8b13303734241 /handlers
parent609574f51c5c08af71419bddc1be16ad5668882a (diff)
Base system.
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