From 6691410f945719e62601c3d69d9b2ff9c4cfb4fb Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Thu, 4 Jan 2024 12:59:39 +0100 Subject: Base system. --- handlers/main.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 handlers/main.yml (limited to 'handlers') 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 -- cgit v1.2.3