From c34b59633c57dec35c9a089ef1f104ce25bdee25 Mon Sep 17 00:00:00 2001 From: Markus Pesch Date: Tue, 8 Sep 2026 23:46:59 +0200 Subject: [PATCH] fix(tasks): stop reporting a change when looking up the btrfs device `findmnt` only reads the mount table, but the task declared `changed_when` on a successful return code and therefore reported a change on every single run. Any btrfs backed user made the whole play non idempotent, which an idempotence check would flag as soon as one exists. The `failed_when` on a non zero return code is dropped along with it, since that is exactly what the command module does by default. Co-authored-by: Copilot --- tasks/create_unix_user.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tasks/create_unix_user.yaml b/tasks/create_unix_user.yaml index 5fbb3a6..ba560d9 100644 --- a/tasks/create_unix_user.yaml +++ b/tasks/create_unix_user.yaml @@ -12,8 +12,7 @@ ansible.builtin.command: cmd: /bin/bash -c "findmnt -no SOURCE -T {{ user_user_home }} | sed 's/\[.*\]//'" register: _unix_users_btrfs_device - failed_when: _unix_users_btrfs_device.rc != 0 - changed_when: _unix_users_btrfs_device.rc == 0 + changed_when: false - name: "Determine filesystem of device" ansible.builtin.set_fact: