Install ipmitool before compute node discovery
This commit is contained in:
parent
30f75383e3
commit
175bb0aa5e
@ -17,7 +17,19 @@
|
|||||||
- name: Ensure compute nodes are PXE booted
|
- name: Ensure compute nodes are PXE booted
|
||||||
hosts: compute
|
hosts: compute
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
|
vars:
|
||||||
|
delegate_host: "{{ groups['controllers'][0] }}"
|
||||||
tasks:
|
tasks:
|
||||||
|
- name: Ensure ipmitool is installed
|
||||||
|
yum:
|
||||||
|
name: ipmitool
|
||||||
|
state: installed
|
||||||
|
become: True
|
||||||
|
run_once: True
|
||||||
|
delegate_to: "{{ item }}"
|
||||||
|
with_items:
|
||||||
|
- "{{ hostvars[delegate_host].ansible_host }}"
|
||||||
|
|
||||||
- name: Set a fact containing the compute node IPMI address
|
- name: Set a fact containing the compute node IPMI address
|
||||||
set_fact:
|
set_fact:
|
||||||
ipmi_username: "{{ inspector_ipmi_username }}"
|
ipmi_username: "{{ inspector_ipmi_username }}"
|
||||||
@ -28,7 +40,7 @@
|
|||||||
command: ipmitool -U {{ ipmi_username }} -P {{ ipmi_password }} -H {{ ipmi_address }} -I lanplus chassis power off
|
command: ipmitool -U {{ ipmi_username }} -P {{ ipmi_password }} -H {{ ipmi_address }} -I lanplus chassis power off
|
||||||
delegate_to: "{{ item }}"
|
delegate_to: "{{ item }}"
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ hostvars[groups['controllers'][0]].ansible_host }}"
|
- "{{ hostvars[delegate_host].ansible_host }}"
|
||||||
|
|
||||||
- name: Pause to prevent overwhelming BMCs
|
- name: Pause to prevent overwhelming BMCs
|
||||||
pause:
|
pause:
|
||||||
@ -38,7 +50,7 @@
|
|||||||
command: ipmitool -U {{ ipmi_username }} -P {{ ipmi_password }} -H {{ ipmi_address }} -I lanplus chassis bootdev pxe
|
command: ipmitool -U {{ ipmi_username }} -P {{ ipmi_password }} -H {{ ipmi_address }} -I lanplus chassis bootdev pxe
|
||||||
delegate_to: "{{ item }}"
|
delegate_to: "{{ item }}"
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ hostvars[groups['controllers'][0]].ansible_host }}"
|
- "{{ hostvars[delegate_host].ansible_host }}"
|
||||||
|
|
||||||
- name: Pause to prevent overwhelming BMCs
|
- name: Pause to prevent overwhelming BMCs
|
||||||
pause:
|
pause:
|
||||||
@ -48,4 +60,4 @@
|
|||||||
command: ipmitool -U {{ ipmi_username }} -P {{ ipmi_password }} -H {{ ipmi_address }} -I lanplus chassis power on
|
command: ipmitool -U {{ ipmi_username }} -P {{ ipmi_password }} -H {{ ipmi_address }} -I lanplus chassis power on
|
||||||
delegate_to: "{{ item }}"
|
delegate_to: "{{ item }}"
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ hostvars[groups['controllers'][0]].ansible_host }}"
|
- "{{ hostvars[delegate_host].ansible_host }}"
|
||||||
|
Loading…
Reference in New Issue
Block a user