refactor ♻️: Convert string to boolean for condition and changed_when
Refactored the code to convert string values to boolean for conditional checks and update the `changed_when` attribute accordingly.
This commit is contained in:
@@ -16,7 +16,8 @@
|
|||||||
when:
|
when:
|
||||||
- proxmox_disable_swap
|
- proxmox_disable_swap
|
||||||
- ansible_memtotal_mb >= proxmox_min_ram_mb_for_no_swap
|
- ansible_memtotal_mb >= proxmox_min_ram_mb_for_no_swap
|
||||||
- active_swaps.stdout != ""
|
- active_swaps.stdout | bool
|
||||||
|
changed_when: active_swaps.stdout | bool
|
||||||
|
|
||||||
- name: swap | Comment swap entries in fstab
|
- name: swap | Comment swap entries in fstab
|
||||||
ansible.builtin.replace:
|
ansible.builtin.replace:
|
||||||
|
|||||||
Reference in New Issue
Block a user