From 00a6fcc966089abaa8d6cf4f746f45903567bb7a Mon Sep 17 00:00:00 2001 From: Jose Date: Fri, 26 Dec 2025 16:30:29 +0100 Subject: [PATCH] =?UTF-8?q?refactor=20=E2=99=BB=EF=B8=8F:=20Add=20changed?= =?UTF-8?q?=5Fwhen:=20true=20to=20tasks=20for=20better=20task=20tracking?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This refactoring adds the 'changed_when' attribute to Ansible tasks, enhancing their ability to report changes accurately and improving overall task tracking. --- tasks/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tasks/main.yml b/tasks/main.yml index 58f7813..2c780b1 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -71,6 +71,7 @@ when: - wol_mode not in item.1.stdout - wol_mode in item.2.stdout + changed_when: true - name: "Disable Wake-on-LAN" ansible.builtin.command: "ethtool -s {{ item.0 }} wol {{ wol_mode }}" @@ -80,6 +81,7 @@ when: - wol_mode == 'd' - wol_mode not in item.1.stdout + changed_when: true - name: Deploy wol systemd template ansible.builtin.template: