apiVersion: v1 baseDomain: "{{ okd_base_domain }}" compute: - name: worker architecture: "{{ okd_worker_architecture }}" platform: baremetal: {} replicas: {{ okd_worker_replicas }} controlPlane: name: master architecture: "{{ okd_controller_architecture }}" platform: baremetal: {} replicas: {{ okd_controller_replicas }} metadata: name: "{{ okd_name }}" networking: machineNetwork: - cidr: "{{ okd_machine_network }}" networkType: "{{ okd_network_type }}" platform: baremetal: apiVIPs: {{ okd_api_vip }} ingressVIPs: {{ okd_ingress_vip }} bootstrapExternalStaticDNS: "{{ okd_bootstrap_external_static_dns }}" bootstrapExternalStaticGateway: "{{ okd_bootstrap_external_static_gateway }}" bootstrapExternalStaticIP: "{{ okd_bootstrap_external_static_ip }}" {% if ocp_bootstrap_os_image is defined %} bootstrapOSImage: "{{ ocp_bootstrap_os_image }}" {% endif %} 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: redfish://{{ hostvars[host].ipmi.ip_address }}/redfish/v1/Systems/1 disableCertificateVerification: True username: "{{ ipmi.username }}" password: "{{ ipmi.password }}" bootMACAddress: "{{ hostvars[host].interface_IPs.pxe.macaddress }}" bootMode: UEFI role: master rootDeviceHints: deviceName: {{ hostvars[host].root_device | default('/dev/sda') }} {% if not (ocp_use_dhcp | default(false)) %} networkConfig: interfaces: {% if hostvars[host].interface_bonding is defined %} {% for port in hostvars[host].interface_bonding.members | default([]) %} - name: {{ port }} type: ethernet state: up {% endfor %} - name: {{ hostvars[host].interface_bonding.name | default('bond0') }} type: bond state: up ipv4: address: - ip: "{{ hostvars[host].interface_IPs.baremetal.ipv4 | ansible.utils.ipaddr('address') }}" prefix-length: "{{ hostvars[host].interface_IPs.baremetal.ipv4 | ansible.utils.ipaddr('prefix') }}" enabled: true link-aggregation: options: miimon: '100' mode: {{ hostvars[host].interface_bonding.mode | default('802.3ad') }} ports: {% for port in hostvars[host].interface_bonding.members | default([]) %} - {{ port }} {% endfor %} {% endif %} - name: {{ hostvars[host].interface_IPs.pxe.interface_name }} type: vlan state: up {% if hostvars[host].interface_IPs.pxe.ipv4 is defined %} ipv4: address: - ip: "{{ hostvars[host].interface_IPs.pxe.ipv4 | ansible.utils.ipaddr('address') }}" prefix-length: "{{ hostvars[host].interface_IPs.pxe.ipv4 | ansible.utils.ipaddr('prefix') }}" enabled: true {% endif %} vlan: base-iface: "{{ hostvars[host].interface_IPs.pxe.interface | default('bond0') }}" id: "{{ hostvars[host].interface_IPs.pxe.vlan | default('0') }}" 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_bonding.name | default('bond0') }} {% endif %} {% endfor %} {% for host in groups["worker"] %} - name: worker-{{ loop.index - 1 }} bmc: address: redfish://{{ hostvars[host].ipmi.ip_address }}/redfish/v1/Systems/1 disableCertificateVerification: True username: "{{ ipmi.username }}" password: "{{ ipmi.password }}" bootMACAddress: "{{ hostvars[host].interface_IPs.pxe.macaddress }}" bootMode: UEFI role: worker rootDeviceHints: deviceName: {{ hostvars[host].root_device | default('/dev/sda') }} {% if not (ocp_use_dhcp | default(false)) %} networkConfig: interfaces: {% if hostvars[host].interface_bonding is defined %} {% for port in hostvars[host].interface_bonding.members | default([]) %} - name: {{ port }} type: ethernet state: up {% endfor %} - name: {{ hostvars[host].interface_bonding.name | default('bond0') }} type: bond state: up ipv4: address: - ip: "{{ hostvars[host].interface_IPs.baremetal.ipv4 | ansible.utils.ipaddr('address') }}" prefix-length: "{{ hostvars[host].interface_IPs.baremetal.ipv4 | ansible.utils.ipaddr('prefix') }}" enabled: true link-aggregation: options: miimon: '100' mode: {{ hostvars[host].interface_bonding.mode | default('802.3ad') }} ports: {% for port in hostvars[host].interface_bonding.members | default([]) %} - {{ port }} {% endfor %} {% endif %} - name: {{ hostvars[host].interface_IPs.pxe.interface_name }} type: vlan state: up {% if hostvars[host].interface_IPs.pxe.ipv4 is defined %} ipv4: address: - ip: "{{ hostvars[host].interface_IPs.pxe.ipv4 | ansible.utils.ipaddr('address') }}" prefix-length: "{{ hostvars[host].interface_IPs.pxe.ipv4 | ansible.utils.ipaddr('prefix') }}" enabled: true {% endif %} vlan: base-iface: "{{ hostvars[host].interface_IPs.pxe.interface | default('bond0') }}" id: "{{ hostvars[host].interface_IPs.pxe.vlan | default('0') }}" 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_bonding.name | default('bond0') }} {% endif %} {% endfor %} pullSecret: '{{ ocp_pull_secret }}' sshKey: "{{ ocp_ssh_key }}"