Add error msg for check of local ip (#6761)
When stopping at the check of "Stop if ip var does not match local ips" the error message is like: fatal: [single-k8s]: FAILED! => { "assertion": "ip in ansible_all_ipv4_addresses", "changed": false, "evaluated_to": false, "msg": "Assertion failed" } That doesn't contain actual IP addresses and it is difficult to understand what was wrong. This adds the error message which contain actual IP addresses to investigate the issue if happens.
This commit is contained in:
parent
aba63f0f9a
commit
109391031b
1 changed files with 1 additions and 0 deletions
|
@ -95,6 +95,7 @@
|
||||||
- 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
|
||||||
|
msg: "'{{ ansible_all_ipv4_addresses }}' do not contain '{{ ip }}'"
|
||||||
when:
|
when:
|
||||||
- not ignore_assert_errors
|
- not ignore_assert_errors
|
||||||
- ip is defined
|
- ip is defined
|
||||||
|
|
Loading…
Reference in a new issue