---
- name: "Verify SELinux is enforcing"
  fail:
    msg: "SELinux is required for OpenShift and has been detected as '{{ ansible_selinux.config_mode }}'"
  when: ansible_selinux.config_mode != "enforcing"

- include_tasks: container-storage-setup.yml

- include_tasks: node-network.yml

---
# NOTE(shadower): we need to do this because some of the install tasks seem to
# ignore openshift_hostname and rely on the actual system's hostname
- name: Update hostname to openshift_hostname
  hostname:
    name: "{{ openshift_hostname }}"

- name: "Verify SELinux is enforcing"
  fail:
    msg: "SELinux is required for OpenShift and has been detected as '{{ ansible_selinux.config_mode }}'"
  when: ansible_selinux.config_mode != "enforcing"

- include_tasks: container-storage-setup.yml

- include_tasks: node-network.yml

Set OpenStack VM hostname to the entry in Nova
Set OpenStack VM hostname to the entry in Nova

OpenStack appends a domain suffix (`.novalocal` by default) to the
hostnames of the VMs it creates. This clashes with the new control plane
install tasks that look at the hostname rather than the
`openshift_hostname` variable.

This makes the OpenStack playbooks function again with the new control
plane/bootstrap installation.
