diff --git a/ansible/compute-node-discovery.yml b/ansible/compute-node-discovery.yml index 6dded81c1..93cf7548f 100644 --- a/ansible/compute-node-discovery.yml +++ b/ansible/compute-node-discovery.yml @@ -1,8 +1,8 @@ --- - include: dell-compute-node-inventory.yml -- name: Ensure compute nodes are PXE booted - hosts: compute +- name: Ensure baremetal compute nodes are PXE booted + hosts: baremetal-compute gather_facts: no vars: controller_host: "{{ groups['controllers'][0] }}" @@ -19,7 +19,7 @@ # be respected when using delegate_to. ansible_host: "{{ hostvars[controller_host].ansible_host | default(controller_host) }}" - - name: Ensure compute nodes are powered off + - name: Ensure baremetal compute nodes are powered off command: ipmitool -U {{ ipmi_username }} -P {{ ipmi_password }} -H {{ ipmi_address }} -I lanplus chassis power off delegate_to: "{{ controller_host }}" vars: @@ -31,7 +31,7 @@ pause: seconds: 5 - - name: Ensure compute nodes are set to boot via PXE + - name: Ensure baremetal compute nodes are set to boot via PXE command: ipmitool -U {{ ipmi_username }} -P {{ ipmi_password }} -H {{ ipmi_address }} -I lanplus chassis bootdev pxe delegate_to: "{{ controller_host }}" vars: @@ -43,7 +43,7 @@ pause: seconds: 5 - - name: Ensure compute nodes are powered on + - name: Ensure baremetal compute nodes are powered on command: ipmitool -U {{ ipmi_username }} -P {{ ipmi_password }} -H {{ ipmi_address }} -I lanplus chassis power on delegate_to: "{{ controller_host }}" vars: diff --git a/ansible/compute-node-provide.yml b/ansible/compute-node-provide.yml index e06959900..2e9355015 100644 --- a/ansible/compute-node-provide.yml +++ b/ansible/compute-node-provide.yml @@ -1,14 +1,14 @@ --- -# This playbook will ensure that all compute nodes in the overcloud ironic -# inventory are available. Supported initial states include 'enroll' and +# This playbook will ensure that all baremetal compute nodes in the overcloud +# ironic inventory are available. Supported initial states include 'enroll' and # 'manageable'. -- name: Ensure compute nodes are available in ironic +- name: Ensure baremetal compute nodes are available in ironic hosts: controllers[0] vars: venv: "{{ virtualenv_path }}/shade" - # Set this to a colon-separated list of compute node hostnames to provide. - # If unset, all compute nodes will be provided. + # Set this to a colon-separated list of baremetal compute node hostnames to + # provide. If unset, all baremetal compute nodes will be provided. compute_node_limit: "" compute_node_limit_list: "{{ compute_node_limit.split(':') }}" roles: @@ -74,7 +74,7 @@ - name: Fail if any ironic nodes are not available fail: msg: > - Failed to make compute node {{ item['Name'] }} available in ironic. + Failed to make baremetal compute node {{ item['Name'] }} available in ironic. Provisioning state is {{ item['Provisioning State'] }}. with_items: "{{ ironic_nodes }}" when: item['Provisioning State'] != 'available' diff --git a/ansible/dell-compute-node-boot-mode.yml b/ansible/dell-compute-node-boot-mode.yml index fe4bdbd87..bf78317f1 100644 --- a/ansible/dell-compute-node-boot-mode.yml +++ b/ansible/dell-compute-node-boot-mode.yml @@ -1,11 +1,11 @@ --- -# Set the boot mode (BIOS, UEFI) of Dell compute nodes. +# Set the boot mode (BIOS, UEFI) of Dell baremetal compute nodes. -# Add compute nodes to the Ansible inventory. +# Add Dell baremetal compute nodes to the Ansible inventory. - include: dell-compute-node-boot-mode.yml -- name: Ensure compute nodes boot mode is set - hosts: compute +- name: Ensure Dell baremetal compute nodes boot mode is set + hosts: baremetal-compute gather_facts: no vars: # Set this to the required boot mode. One of 'bios' or 'uefi'. diff --git a/ansible/dell-compute-node-discovery.yml b/ansible/dell-compute-node-discovery.yml index 597e641fe..9cf26cc4b 100644 --- a/ansible/dell-compute-node-discovery.yml +++ b/ansible/dell-compute-node-discovery.yml @@ -1,11 +1,11 @@ --- -# Configure the compute nodes to PXE boot. +# Configure the Dell baremetal compute nodes to PXE boot. -# Add compute nodes to the Ansible inventory. +# Add Dell baremetal compute nodes to the Ansible inventory. - include: dell-compute-node-inventory.yml -- name: Ensure compute nodes are PXE booted - hosts: compute +- name: Ensure Dell baremetal compute nodes are PXE booted + hosts: baremetal-compute gather_facts: no vars: # Set this to the index of the inteface on which to enable PXE. diff --git a/ansible/dell-compute-node-inventory.yml b/ansible/dell-compute-node-inventory.yml index 90ed61b97..ac3279a6b 100644 --- a/ansible/dell-compute-node-inventory.yml +++ b/ansible/dell-compute-node-inventory.yml @@ -1,17 +1,18 @@ --- -- name: Ensure compute nodes are present in the Ansible inventory +- name: Ensure Dell baremetal compute nodes are present in the Ansible inventory hosts: config-mgmt gather_facts: no vars: - # Set this to a colon-separated list of compute node hostnames on which to - # trigger discovery. If unset, all compute nodes will be triggered. + # Set this to a colon-separated list of baremeal compute node hostnames on + # which to trigger discovery. If unset, all compute nodes will be + # triggered. compute_node_limit: "" compute_node_limit_list: "{{ compute_node_limit.split(':') }}" tasks: - - name: Add hosts for the compute nodes + - name: Add hosts for the Dell baremetal compute nodes add_host: name: "{{ item.key }}" - groups: compute + groups: baremetal-compute # SSH configuration to access the BMC. ansible_host: "{{ item.value }}" ansible_user: "{{ ipmi_username }}" @@ -24,8 +25,8 @@ - not compute_node_limit or item.key | replace('-idrac', '') in compute_node_limit_list run_once: True -- name: Ensure compute nodes are present in the Ansible inventory - hosts: compute +- name: Ensure Dell baremetal compute nodes are present in the Ansible inventory + hosts: baremetal-compute gather_facts: no vars: compute_node_limit: "" @@ -33,7 +34,9 @@ tasks: - name: Set facts for the compute nodes for IPMI addresses set_fact: + bmc_type: idrac ipmi_address: "{{ idrac_network_ips[inventory_hostname] }}" - # Don't add hosts that already exist. - when: not compute_node_limit or inventory_hostname in compute_node_limit_list + when: + - not ipmi_address + - not compute_node_limit or inventory_hostname in compute_node_limit_list run_once: True diff --git a/etc/kayobe/inventory/groups b/etc/kayobe/inventory/groups index e7aef20e3..2166e1b38 100644 --- a/etc/kayobe/inventory/groups +++ b/etc/kayobe/inventory/groups @@ -32,6 +32,12 @@ network monitoring compute +############################################################################### +# Baremetal compute node groups. + +[baremetal-compute] +# Empty group to provide declaration of baremetal-compute group. + ############################################################################### # Networking groups. diff --git a/etc/kayobe/inventory/hosts.example b/etc/kayobe/inventory/hosts.example index b3dc7a39d..1cce1ce29 100644 --- a/etc/kayobe/inventory/hosts.example +++ b/etc/kayobe/inventory/hosts.example @@ -18,6 +18,9 @@ localhost ansible_connection=local # Add controller nodes here if required. These hosts will provide the # OpenStack overcloud. +[baremetal-compute] +# Add baremetal compute nodes here if required. + [mgmt-switches] # Add management network switches here if required.