kayobe/ansible/baremetal-compute-provide.yml
Mark Goddard a2cbe94b76 Improve bare metal compute node management
Adds these new commands:

kayobe baremetal compute inspect
kayobe baremetal compute manage
kayobe baremetal compute provide

These can be used to set the provision state of ironic nodes in the
baremetal-compute group.
2017-12-13 11:30:26 +00:00

45 lines
1.5 KiB
YAML

---
# This playbook will ensure that all baremetal compute nodes in the overcloud
# ironic inventory are available. Supported initial states include 'enroll' and
# 'manageable'.
# We install shade in a virtualenv on one of the controllers, and delegate to
# it when executing the stackhpc.os-ironic-state role.
- name: Ensure baremetal compute nodes are available in ironic
hosts: controllers[0]
gather_facts: False
vars:
venv: "{{ virtualenv_path }}/shade"
roles:
- role: stackhpc.os-shade
os_shade_venv: "{{ venv }}"
- role: activate-virtualenv
activate_virtualenv_path: "{{ venv }}"
- name: Ensure baremetal compute nodes are available in ironic
hosts: baremetal-compute
gather_facts: False
vars:
# Whether to wait for the state transition to complete.
baremetal_compute_wait: True
# Time to wait for state transition to complete, if baremetal_compute_wait
# is True.
baremetal_compute_timeout: 1200
roles:
- role: stackhpc.os-ironic-state
os_ironic_state_auth_type: "{{ openstack_auth_type }}"
os_ironic_state_auth: "{{ openstack_auth }}"
os_ironic_state_name: "{{ inventory_hostname }}"
os_ironic_state_provision_state: "provide"
os_ironic_state_wait: "{{ baremetal_compute_wait }}"
os_ironic_state_timeout: "{{ baremetal_compute_timeout }}"
os_ironic_state_delegate_to: "{{ groups['controllers'][0] }}"
- name: Ensure baremetal compute nodes are available in ironic
hosts: controllers[0]
gather_facts: False
roles:
- role: deactivate-virtualenv