Browse Source

Add assertion for IPv6 in verify settings

Co-authored-by: Kenichi Omichi <ken1ohmichi@gmail.com>
pull/8997/head
Citrullin 2 years ago
committed by Florian Ruynat
parent
commit
e7729daefc
1 changed files with 2 additions and 2 deletions
  1. 4
      roles/kubernetes/preinstall/tasks/0020-verify-settings.yml

4
roles/kubernetes/preinstall/tasks/0020-verify-settings.yml

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

Loading…
Cancel
Save