From f5716e81d806c6f57c2313107fcd130f04772c8b Mon Sep 17 00:00:00 2001
From: Thomas Schneider <thomas@fsmpi.rwth-aachen.de>
Date: Wed, 15 Jun 2022 16:31:20 +0200
Subject: [PATCH] basic-system/network: Ensure dbus is really available for
 hostnamectl

Installing `dbus` does not start the service, even though it is enabled through
a symlink in /lib/systemd/system/sockets.target.wants.
---
 basic-system/tasks/network.yml | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/basic-system/tasks/network.yml b/basic-system/tasks/network.yml
index be7e8f2..35b4795 100644
--- a/basic-system/tasks/network.yml
+++ b/basic-system/tasks/network.yml
@@ -1,5 +1,4 @@
 ---
-# file: roles/common/tasks/dns.yml
 
 - name: ensure dns is configured
   template:
@@ -19,6 +18,14 @@
     - dns
     - network
 
+- name: ensure dbus is really available
+  systemd:
+    name: dbus.socket
+    state: started
+  tags:
+    - dns
+    - network
+
 - name: ensure the hostname is not a fqdn
   hostname:
     name: "{{ ansible_hostname }}"
-- 
GitLab