diff --git a/playbooks/7_ocp_verification.yaml b/playbooks/7_ocp_verification.yaml index eb360dec..3feb751b 100644 --- a/playbooks/7_ocp_verification.yaml +++ b/playbooks/7_ocp_verification.yaml @@ -16,3 +16,5 @@ approve_certs_cleanup: true - wait_for_cluster_operators - wait_for_install_complete + - label_infra_nodes + diff --git a/roles/create_control_nodes/tasks/main.yaml b/roles/create_control_nodes/tasks/main.yaml index ef55f010..2f033ae9 100644 --- a/roles/create_control_nodes/tasks/main.yaml +++ b/roles/create_control_nodes/tasks/main.yaml @@ -74,7 +74,7 @@ --noautoconsole when: env.z.high_availability == True and inventory_hostname == env.z.lpar1.hostname and env.cluster.nodes.control.vm_name[0] not in hosts_with_host_vars -- name: Create the second CoreOS control node on the first KVM host, if cluster is to be highly available. +- name: Create the second CoreOS control node on the second KVM host, if cluster is to be highly available. tags: create_control_nodes shell: | virt-install \ @@ -105,7 +105,7 @@ --noautoconsole when: env.z.high_availability == True and inventory_hostname == env.z.lpar2.hostname and env.cluster.nodes.control.vm_name[1] not in hosts_with_host_vars -- name: Create the third CoreOS control node on the first KVM host, if cluster is to be highly available. +- name: Create the third CoreOS control node on the third KVM host, if cluster is to be highly available. tags: create_control_nodes shell: | virt-install \ diff --git a/roles/label_infra_nodes/tasks/main.yaml b/roles/label_infra_nodes/tasks/main.yaml new file mode 100644 index 00000000..ccdbcb00 --- /dev/null +++ b/roles/label_infra_nodes/tasks/main.yaml @@ -0,0 +1,11 @@ +--- + +- name: 'Label infra nodes as infra' + tags: check_nodes + ansible.builtin.shell: | + set -o pipefail + oc label node $(oc get nodes | grep "^{{ node | lower }}" | awk '{print $1}') node-role.kubernetes.io/infra= --overwrite + loop: "{{ (env.cluster.nodes.infra.hostname | default([])) }}" + loop_control: + loop_var: node +