Add assertion for IPv6 in verify settings

Co-authored-by: Kenichi Omichi <ken1ohmichi@gmail.com>
This commit is contained in:
Citrullin 2022-06-08 17:37:48 +02:00 committed by Florian Ruynat
parent 97b4d79ed5
commit e7729daefc

View file

@ -94,8 +94,8 @@
- name: Stop if ip var does not match local ips - name: Stop if ip var does not match local ips
assert: assert:
that: ip in ansible_all_ipv4_addresses that: (ip in ansible_all_ipv4_addresses) or (ip in ansible_all_ipv6_addresses)
msg: "'{{ ansible_all_ipv4_addresses }}' do not contain '{{ ip }}'" msg: "IPv4: '{{ ansible_all_ipv4_addresses }}' and IPv6: '{{ ansible_all_ipv6_addresses }}' do not contain '{{ ip }}'"
when: when:
- not ignore_assert_errors - not ignore_assert_errors
- ip is defined - ip is defined