diff --git a/workbooks/baremetal.yaml b/workbooks/baremetal.yaml index 3aff200be..fa88ca8ab 100644 --- a/workbooks/baremetal.yaml +++ b/workbooks/baremetal.yaml @@ -926,19 +926,30 @@ workflows: - tripleo-common-managed tasks: + get_active_nodes: + action: ironic.node_list maintenance=false provision_state='active' detail=true + on-success: get_available_nodes + on-error: set_status_failed_get_active_nodes + get_available_nodes: action: ironic.node_list maintenance=false provision_state='available' detail=true on-success: get_matching_nodes on-error: set_status_failed_get_available_nodes get_matching_nodes: - with-items: node in <% task(get_available_nodes).result %> + with-items: node in <% task(get_available_nodes).result + task(get_active_nodes).result %> action: tripleo.baremetal.get_profile node=<% $.node %> on-success: send_message on-error: set_status_failed_get_matching_nodes publish: matching_nodes: <% let(input_profile_name => $.profile) -> task().result.where($.profile = $input_profile_name).uuid %> + set_status_failed_get_active_nodes: + on-success: send_message + publish: + status: FAILED + message: <% task(get_active_nodes).result %> + set_status_failed_get_available_nodes: on-success: send_message publish: