Fail nicely if ironic port lookup fails

Change-Id: I7e1a937b2870af08a6748adf9dcfa71d49be9957
TrivialFix
This commit is contained in:
Mark Goddard 2018-11-26 10:36:47 +00:00
parent 6a2fb44a78
commit 1e2bd2cc2f
1 changed files with 5 additions and 0 deletions

View File

@ -8,6 +8,11 @@
register: uuid
changed_when: false
- name: Fail if port is not found
fail:
msg: Ironic port with MAC address {{ mac }} not found
when: uuid.stdout == ""
- name: Get physical network name
set_fact:
physnet: "{{ source_interface | source_link_to_physnet_name(