Skip to content

Commit 501ae13

Browse files
holserclaude
authored andcommitted
[dnsmasq] Fix ipaddr filter to return boolean in conditional
Use ternary filter to convert ansible.utils.ipaddr result to explicit boolean. Ansible 2.16+ requires conditionals to evaluate to true/false, not truthy/falsy values. Co-Authored-By: Claude <[email protected]> Signed-off-by: Sergii Golovatiuk <[email protected]>
1 parent e65906b commit 501ae13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

roles/dnsmasq/tasks/manage_address.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
that:
1212
- item.state is defined
1313
- item.state in ['present', 'absent']
14-
- item.ipaddr is undefined or (item.ipaddr is defined and (item.ipaddr | ansible.utils.ipaddr))
14+
- item.ipaddr is undefined or (item.ipaddr is defined and ((item.ipaddr | ansible.utils.ipaddr) | ternary(true, false)))
1515
- item.domains is defined
1616
- (item.domains | type_debug) == "list"
1717
loop: "{{ cifmw_dnsmasq_address }}"

0 commit comments

Comments
 (0)