Skip to content

Commit

Permalink
enable networkType customization
Browse files Browse the repository at this point in the history
  • Loading branch information
hgeaydem committed May 10, 2022
1 parent 28c5dea commit c2885c3
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ocp4_aio_network_type: OVNKubernetes
6 changes: 6 additions & 0 deletions tasks/deploy_cluster_ipi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions tasks/deploy_cluster_sno_iso.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions tasks/deploy_cluster_upi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c2885c3

Please sign in to comment.