diff --git a/defaults/main.yml b/defaults/main.yml new file mode 100644 index 0000000..dc15315 --- /dev/null +++ b/defaults/main.yml @@ -0,0 +1 @@ +ocp4_aio_network_type: OVNKubernetes \ No newline at end of file diff --git a/tasks/deploy_cluster_ipi.yml b/tasks/deploy_cluster_ipi.yml index 404eb90..6832c39 100644 --- a/tasks/deploy_cluster_ipi.yml +++ b/tasks/deploy_cluster_ipi.yml @@ -192,6 +192,12 @@ replace: "http://192.168.123.100:81/rhcos-qemu.x86_64.qcow2.gz?sha256={{ rhcos_qemu_sha256 }}" when: ocp4_aio_deploy_type == "ipi" +- name: Set network type in install-config + ansible.builtin.replace: + path: /root/ocp-install/install-config.yaml + regexp: 'NETWORK_TYPE' + replace: "{{ ocp4_aio_network_type }}" + - name: Make a backup of the install-config from ocp-install directory ansible.builtin.copy: remote_src: yes diff --git a/tasks/deploy_cluster_sno_iso.yml b/tasks/deploy_cluster_sno_iso.yml index d091e1a..6e744c3 100644 --- a/tasks/deploy_cluster_sno_iso.yml +++ b/tasks/deploy_cluster_sno_iso.yml @@ -57,6 +57,12 @@ insertafter: '^#pullSecret: ' line: "pullSecret: {{pull_secret | to_json | to_json if pull_secret is mapping else pull_secret | to_json }}" +- name: Set network type in install-config + ansible.builtin.replace: + path: /root/ocp-install/install-config.yaml + regexp: 'NETWORK_TYPE' + replace: "{{ ocp4_aio_network_type }}" + - name: Copy lab install-config to SNO install directory ansible.builtin.copy: remote_src: yes diff --git a/tasks/deploy_cluster_upi.yml b/tasks/deploy_cluster_upi.yml index 1382579..3951121 100644 --- a/tasks/deploy_cluster_upi.yml +++ b/tasks/deploy_cluster_upi.yml @@ -54,6 +54,12 @@ dest: /root/ocp-install/install-config.yaml when: ocp4_aio_deploy_type == "upi" +- name: Set network type in install-config + ansible.builtin.replace: + path: /root/ocp-install/install-config.yaml + regexp: 'NETWORK_TYPE' + replace: "{{ ocp4_aio_network_type }}" + - name: Create Ignition Configs for UPI ansible.builtin.command: > openshift-install --dir=/root/ocp-install/ create ignition-configs