Merge "Revert "Modify the introspection playbook to simplify client interactions""
This commit is contained in:
commit
be80cd7ac6
@ -29,12 +29,44 @@
|
|||||||
- name: Check for required inputs
|
- name: Check for required inputs
|
||||||
fail:
|
fail:
|
||||||
msg: >
|
msg: >
|
||||||
Input missing `{{ item }}`
|
Either `node_uuids` or `all_manageable` are required inputs but
|
||||||
when:
|
currently are not set. Check you inputs and try again.
|
||||||
- hostvars[inventory_hostname][item] is undefined
|
when: >-
|
||||||
loop:
|
(node_uuids is undefined and all_manageable is undefined) or
|
||||||
- node_uuids
|
(node_uuids is undefined and not all_manageable|bool)
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
# Pre-introspection validation
|
||||||
|
- name: Run Validations
|
||||||
|
command: >
|
||||||
|
openstack tripleo validator run --group "pre-introspection"
|
||||||
|
when:
|
||||||
|
- run_validations | bool
|
||||||
|
|
||||||
|
# TODO(sshnaidm): change to module when https://review.opendev.org/#/c/694751/ merges
|
||||||
|
- name: Run all manageable block
|
||||||
|
when:
|
||||||
|
- all_manageable is defined
|
||||||
|
- all_manageable|bool
|
||||||
|
block:
|
||||||
|
# Get Node UUIDs, if "all_manageable" is True
|
||||||
|
- name: Get node UUIDS
|
||||||
|
os_baremetal_node_info:
|
||||||
|
auth_type: password
|
||||||
|
cloud: undercloud
|
||||||
|
filters:
|
||||||
|
provision_state: manageable
|
||||||
|
register: manageable_nodes
|
||||||
|
|
||||||
|
- name: Set node_uuids_intro fact
|
||||||
|
set_fact:
|
||||||
|
node_uuids_intro: "{{ manageable_nodes.baremetal_nodes | default([]) | map(attribute='id') | list }}"
|
||||||
|
|
||||||
|
- name: Process only passed node UUIDs
|
||||||
|
when:
|
||||||
|
- all_manageable is not defined or not all_manageable|bool
|
||||||
|
block:
|
||||||
|
|
||||||
- name: Set node_uuids_intro fact
|
- name: Set node_uuids_intro fact
|
||||||
set_fact:
|
set_fact:
|
||||||
node_uuids_intro: "{{ node_uuids }}"
|
node_uuids_intro: "{{ node_uuids }}"
|
||||||
@ -50,13 +82,6 @@
|
|||||||
when:
|
when:
|
||||||
- node_uuids_intro == []
|
- node_uuids_intro == []
|
||||||
|
|
||||||
# Pre-introspection validation
|
|
||||||
- name: Run Validations
|
|
||||||
command: >
|
|
||||||
openstack tripleo validator run --group "pre-introspection"
|
|
||||||
when:
|
|
||||||
- run_validations | bool
|
|
||||||
|
|
||||||
# Introspect nodes
|
# Introspect nodes
|
||||||
- name: Start baremetal introspection
|
- name: Start baremetal introspection
|
||||||
os_tripleo_baremetal_node_introspection:
|
os_tripleo_baremetal_node_introspection:
|
||||||
|
Loading…
Reference in New Issue
Block a user