Check for specific error messages in ironic version check

When checking for the 1.34 ironic API version for physnet support, explicitly
check for known error messages to make it more robust.

Change-Id: I8c42e85c8b3abe8712879c5737d85ee72e231f9e
This commit is contained in:
Mark Goddard 2018-12-20 15:47:01 +00:00
parent d28635d2cf
commit ff3a73f37d

View File

@ -61,7 +61,12 @@
baremetal node list
register: api_version_result
changed_when: false
failed_when: false
failed_when:
- api_version_result.rc != 0
# 'invalid choice' if the client doesn't support 1.34.
- "'invalid choice' not in api_version_result.stderr"
# 'not supported' if the server doesn't support 1.34.
- "'not supported' not in api_version_result.stderr"
# This is used in port.yml.
- name: Set a fact about whether Ironic supports physical network awareness