kayobe/ansible/baremetal-compute-inspect.yml
Mark Goddard b0359e37df CentOS 8: Add seed and overcloud CI jobs, drop CentOS 7 jobs
CentOS 8 removes interfaces from their bridge during ifdown, and removes
the bridge if there are no interfaces left. When Kayobe bounces veth
links plugged into the bridge, it causes the bridge which has the IP we
are using for SSH to be removed. Use a dummy interface in CI to avoid
this problem.

Kolla-ansible has dropped all CentOS 7 jobs on master now, and prechecks
only allow CentOS 7 hosts. Drop all CentOS 7 jobs. We will have to run
without upgrade jobs in place until Train supports CentOS 8.

Depends-On: https://review.opendev.org/695881

Change-Id: I7c1a885b36445e33d4db1b1c8533db28a644b4a1
Story: 2006574
Task: 38870
2020-03-11 16:36:44 +00:00

48 lines
1.9 KiB
YAML

---
# This playbook will ensure that all baremetal compute nodes in the
# baremetal-compute ansible group are inspected. The nodes should be in the
# 'manageable' state.
# We install openstacksdk in a virtualenv on one of the controllers, and delegate to
# it when executing the stackhpc.os-ironic-state role.
- name: Ensure dependencies are installed
hosts: controllers[0]
gather_facts: true
vars:
venv: "{{ virtualenv_path }}/openstacksdk"
roles:
- role: stackhpc.os_openstacksdk
os_openstacksdk_venv: "{{ venv }}"
os_openstacksdk_install_epel: "{{ yum_install_epel }}"
os_openstacksdk_state: latest
os_openstacksdk_upper_constraints_file: "{{ pip_upper_constraints_file }}"
- name: Ensure baremetal compute nodes are inspected in ironic
hosts: baremetal-compute
gather_facts: False
vars:
controller_host: "{{ groups['controllers'][0] }}"
venv: "{{ virtualenv_path }}/openstacksdk"
ansible_python_interpreter: "{{ venv }}/python"
# 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
tasks:
- name: Ensure baremetal compute nodes are inspected in ironic
os_ironic_inspect:
auth_type: "{{ openstack_auth_type }}"
auth: "{{ openstack_auth }}"
cacert: "{{ openstack_cacert | default(omit, true) }}"
interface: "{{ openstack_interface | default(omit, true) }}"
name: "{{ inventory_hostname }}"
timeout: "{{ baremetal_compute_timeout }}"
wait: "{{ baremetal_compute_wait }}"
delegate_to: "{{ controller_host }}"
vars:
# NOTE: Without this, the controller's ansible_host variable will not
# be respected when using delegate_to.
ansible_host: "{{ hostvars[controller_host].ansible_host | default(controller_host) }}"