Skip to content
Snippets Groups Projects
Unverified Commit 10939103 authored by Kenichi Omichi's avatar Kenichi Omichi Committed by GitHub
Browse files

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.
parent aba63f0f
No related branches found
No related tags found
No related merge requests found
......@@ -95,6 +95,7 @@
- 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 }}'"
when:
- not ignore_assert_errors
- ip is defined
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment