diff --git a/roles/dns/tasks/main.yaml b/roles/dns/tasks/main.yaml index bb48cf62..8e92a0bd 100644 --- a/roles/dns/tasks/main.yaml +++ b/roles/dns/tasks/main.yaml @@ -59,6 +59,7 @@ loop_control: extended: yes index_var: i + when: env.cluster.nodes.compute.hostname is defined - name: Add infrastructure nodes to DNS forwarding file on bastion if requested tags: dns diff --git a/roles/get_ocp/tasks/main.yaml b/roles/get_ocp/tasks/main.yaml index b35d2026..22b32acc 100644 --- a/roles/get_ocp/tasks/main.yaml +++ b/roles/get_ocp/tasks/main.yaml @@ -101,6 +101,7 @@ path: /root/ocpinst/manifests/cluster-scheduler-02-config.yml regexp: ": true" replace: ": false" + when: (env.cluster.nodes.compute.hostname | default('') | length) != 0 - name: Set permissions for ocpinst directory contents to root tags: get_ocp diff --git a/roles/get_ocp/templates/install-config.yaml.j2 b/roles/get_ocp/templates/install-config.yaml.j2 index 12f1ebb3..e5397778 100644 --- a/roles/get_ocp/templates/install-config.yaml.j2 +++ b/roles/get_ocp/templates/install-config.yaml.j2 @@ -20,12 +20,12 @@ env.cluster.nodes.infra.ip|join(',')+ ',' + compute: - hyperthreading: {{ env.install_config.compute.hyperthreading }} name: worker - replicas: {{(env.cluster.nodes.compute.ip | length)}} + replicas: {{ (env.cluster.nodes.compute.hostname | default('') | length) }} architecture: {{ env.install_config.compute.architecture }} controlPlane: hyperthreading: {{ env.install_config.control.hyperthreading }} name: master - replicas: {{(env.cluster.nodes.control.ip | length)}} + replicas: {{(env.cluster.nodes.control.hostname | length)}} architecture: {{ env.install_config.control.architecture }} metadata: name: {{ env.cluster.networking.metadata_name }} diff --git a/roles/haproxy/tasks/main.yaml b/roles/haproxy/tasks/main.yaml index 972c79d0..0efe6547 100644 --- a/roles/haproxy/tasks/main.yaml +++ b/roles/haproxy/tasks/main.yaml @@ -46,6 +46,7 @@ loop_control: extended: yes index_var: i + when: env.cluster.nodes.compute.hostname is defined - name: Add infrastructure node information to 443 section in haproxy config tags: haproxy @@ -68,6 +69,7 @@ loop_control: extended: yes index_var: i + when: env.cluster.nodes.compute.hostname is defined - name: Add infrastructure node information to 80 section in haproxy config tags: haproxy