[PATCH 02/13] devconfig: exclude nfsd from journal upload client configuration

Luis Chamberlain <[email protected]>
Newsgroups dev.linux.lists.kdevops
Message-ID <[email protected]>
The NFS server (nfsd group) should not run systemd-journal-upload
service as it acts as the journal remote server, not a client.
The journal upload service is for clients that send logs to the
remote server.

Add condition to exclude 'nfsd' group members from journal upload
client configuration tasks in both devconfig and fstests roles.

This fixes the failure where systemd-journal-upload.service was
not found on NFS server nodes, as they should only run the
journal remote receiver service, not the upload client.

Generated-by: Claude AI
Signed-off-by: Luis Chamberlain <[email protected]>
---
 playbooks/roles/devconfig/tasks/main.yml | 3 +++
 playbooks/roles/fstests/tasks/main.yml   | 1 +
 2 files changed, 4 insertions(+)

diff --git a/playbooks/roles/devconfig/tasks/main.yml b/playbooks/roles/devconfig/tasks/main.yml
index ae16a698..3499f744 100644
--- a/playbooks/roles/devconfig/tasks/main.yml
+++ b/playbooks/roles/devconfig/tasks/main.yml
@@ -565,6 +565,7 @@
     lstrip_blocks: true
   when:
     - devconfig_enable_systemd_journal_remote|bool
+    - "'nfsd' not in group_names"
 
 - name: Enable and restart systemd-journal-upload.service on the client
   tags: ["journal", "journal-upload-restart"]
@@ -578,6 +579,7 @@
     daemon_reload: true
   when:
     - devconfig_enable_systemd_journal_remote|bool
+    - "'nfsd' not in group_names"
 
 - name: Ensure systemd-journal-remote.service is running on the server
   tags: ["journal-status"]
@@ -602,6 +604,7 @@
     state: started
   when:
     - devconfig_enable_systemd_journal_remote|bool
+    - "'nfsd' not in group_names"
 
 - name: Set up the client /etc/systemd/timesyncd.conf
   tags: ["timesyncd"]
diff --git a/playbooks/roles/fstests/tasks/main.yml b/playbooks/roles/fstests/tasks/main.yml
index 3a57a73b..8f44c109 100644
--- a/playbooks/roles/fstests/tasks/main.yml
+++ b/playbooks/roles/fstests/tasks/main.yml
@@ -1137,6 +1137,7 @@
     state: started
   when:
     - devconfig_enable_systemd_journal_remote|bool
+    - "'nfsd' not in group_names"
 
 - name: Hint to watchdog tests are about to kick off
   ansible.builtin.file:
-- 
2.51.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.