apiVersion: v1 baseDomain: "{{ ocp_base_domain }}" compute: - name: worker architecture: "{{ ocp_worker_architecture }}" platform: baremetal: {} replicas: {{ ocp_worker_replicas }} controlPlane: name: master architecture: "{{ ocp_controller_architecture }}" platform: baremetal: {} replicas: {{ ocp_controller_replicas }} metadata: name: "{{ ocp_name }}" networking: machineNetwork: - cidr: "{{ ocp_machine_network }}" networkType: "{{ ocp_network_type }}" platform: baremetal: apiVIPs: {{ ocp_api_vip }} ingressVIPs: {{ ocp_ingress_vip }} bootstrapExternalStaticDNS: "{{ ocp_bootstrap_external_static_dns }}" bootstrapExternalStaticGateway: "{{ ocp_bootstrap_external_static_gateway }}" bootstrapExternalStaticIP: "{{ ocp_bootstrap_external_static_ip }}" bootstrapOSImage: "{{ ocp_bootstrap_os_image }}" externalBridge: "{{ ocp_external_bridge }}" provisioningBridge: "{{ ocp_provisioning_bridge }}" provisioningNetwork: "{{ ocp_provisioning_network }}" provisioningNetworkCIDR: "{{ ocp_provisioning_network_cidr }}" hosts: {% for host in groups["master"] -%} - name: master-{{ loop.index - 1 }} bmc: address: ipmi://{{ hostvars[host].ipmi.ip_address }} disableCertificateVerification: True username: "{{ ipmi.username }}" password: "{{ ipmi.password }}" bootMACAddress: "{{ hostvars[host].interface_IPs.pxe.macaddress }}" bootMode: UEFI role: master rootDeviceHints: deviceName: /dev/sda {% if not (ocp_use_dhcp | default(false)) %} networkConfig: interfaces: - name: {{ hostvars[host].interface_IPs.ocp.interface }} type: ethernet state: up ipv4: address: - ip: {{ hostvars[host].interface_IPs.ocp.ipv4 }} prefix-length: 24 enabled: true dns-resolver: config: server: - "{{ ocp_bootstrap_external_static_dns }}" routes: config: - destination: 0.0.0.0/0 next-hop-address: "{{ ocp_bootstrap_external_static_gateway }}" next-hop-interface: {{ hostvars[host].interface_IPs.ocp.interface }} {% endif %} {% endfor %} {%- for host in groups["worker"] -%} - name: worker-{{ loop.index - 1 }} bmc: address: ipmi://{{ hostvars[host].ipmi.ip_address }} disableCertificateVerification: True username: "{{ ipmi.username }}" password: "{{ ipmi.password }}" bootMACAddress: "{{ hostvars[host].interface_IPs.pxe.macaddress }}" bootMode: UEFI role: worker rootDeviceHints: deviceName: /dev/sda {% if (ocp_use_dhcp | default(false)) %} networkConfig: interfaces: - name: {{ hostvars[host].interface_IPs.ocp.interface }} type: ethernet state: up ipv4: address: - ip: {{ hostvars[host].interface_IPs.ocp.ipv4 }} prefix-length: 24 enabled: true dns-resolver: config: server: - "{{ ocp_bootstrap_external_static_dns }}" routes: config: - destination: 0.0.0.0/0 next-hop-address: "{{ ocp_bootstrap_external_static_gateway }}" next-hop-interface: {{ hostvars[host].interface_IPs.ocp.interface }} {% endif %} {% endfor %} pullSecret: '{{ ocp_pull_secret }}' sshKey: "{{ ocp_ssh_key }}"