Skip to content
Snippets Groups Projects
Commit 85e0e771 authored by Zuul's avatar Zuul Committed by Gerrit Code Review
Browse files

Merge "Fixes for baremetal compute commands"

parents e748c1d5 21ce37e6
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@
- name: Ensure dependencies are installed and the virtual environment is activated
hosts: controllers[0]
gather_facts: False
gather_facts: true
vars:
venv: "{{ virtualenv_path }}/shade"
roles:
......
......@@ -8,7 +8,7 @@
- name: Ensure baremetal compute nodes are available in ironic
hosts: controllers[0]
gather_facts: False
gather_facts: true
vars:
venv: "{{ virtualenv_path }}/shade"
roles:
......
......@@ -8,7 +8,7 @@
- name: Ensure baremetal compute nodes are available in ironic
hosts: controllers[0]
gather_facts: False
gather_facts: true
vars:
venv: "{{ virtualenv_path }}/shade"
roles:
......
......@@ -54,5 +54,8 @@
# be respected when using delegate_to.
ansible_host: "{{ hostvars[controller_host].ansible_host | default(controller_host) }}"
ipmi_address: "{{ hostvars[inventory_hostname].ipmi_address }}"
node: "{{ (nodes.stdout | from_json) | selectattr('Driver Info.ipmi_address', 'equalto', ipmi_address) | first }}"
when: node['Name'] != inventory_hostname
matching_nodes: "{{ (nodes.stdout | from_json) | selectattr('Driver Info.ipmi_address', 'defined') | selectattr('Driver Info.ipmi_address', 'equalto', ipmi_address) | list }}"
node: "{{ matching_nodes | first }}"
when:
- matching_nodes | length > 0
- node['Name'] != inventory_hostname
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