refactor ♻️: Add changed_when: true to tasks for better task tracking
This refactoring adds the 'changed_when' attribute to Ansible tasks, enhancing their ability to report changes accurately and improving overall task tracking.
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user