Fix condition evaluation on ansible_all_ipv6_addresses to have a Boolean result (#404)

The condition `when: ansible_all_ipv6_addresses` evaluates to a list, which in
term evaluates to True,  but it seems that more recent Ansible versions do not
accept that anymore:

```
Conditional result was "['fe80::...']" of type 'list', which evaluates to True. Conditionals must have a boolean result.
```

This commit adds a length check to create a real Boolean result.

Signed-off-by: Stefan Haun <mail@tuxathome.de>
master
Stefan Haun 2025-04-18 18:07:40 +02:00 committed by GitHub
parent f3d8cc0b18
commit e3fe7ec450
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@
value: "1"
state: present
reload: true
when: ansible_all_ipv6_addresses
when: ansible_all_ipv6_addresses | length > 0
- name: Populate service facts
ansible.builtin.service_facts: