Skip to content

Changes to enable IPSEC Network Configuration #395

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Apr 29, 2025
1 change: 1 addition & 0 deletions docs/set-variables-group-vars.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@
**env.jumphost.user** | (Optional) The user name to login to the jumphost. | admin
**env.jumphost.pass** | (Optional) The password for user to login to the jumphost. | ch4ngeMe!
**env.jumphost.path_to_keypair** | (Optional) The absolute path to the public key file on the jumphost to be copied to the bastion. | /home/admin/.ssh/id_rsa.pub
**env.ipsec_enabled** | (Optional) If IPSEC network configuration has to be enabled, this flag should be set to true |

## 12 - OCP and RHCOS (CoreOS)
* These parameters are responsible which version of OCP, RHCOS and os variant AOP is using. The default value is 'latest' for s390x architecture. I you want to install a different version or a different architecture you need to specify specify the following parameters in all.yaml file:
Expand Down
3 changes: 3 additions & 0 deletions inventories/default/group_vars/all.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@ env:
use_dhcp: False
setup_openvpn: False

# Uncomment the line below to enable IPSec network configuration.
# ipsec_enabled: true

#jumphost if network mode is NAT
jumphost:
name:
Expand Down
9 changes: 9 additions & 0 deletions roles/get_ocp/files/cluster-network-03-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: operator.openshift.io/v1
kind: Network
metadata:
name: cluster
spec:
defaultNetwork:
ovnKubernetesConfig:
ipsecConfig:
mode: Full
18 changes: 18 additions & 0 deletions roles/get_ocp/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,24 @@
/root/ocpinst/openshift-install create manifests --dir=/root/ocpinst/
become: true

- name: Copy the file when ipsec flag is enabled
tags: get_ocp
become: true
copy:
src: cluster-network-03-config.yml
dest: /root/ocpinst/manifests/cluster-network-03-config.yml
when: env.ipsec_enabled is defined and env.ipsec_enabled != None and env.ipsec_enabled

- name: List the files in the manifests directory
tags: get_ocp
become: true
command: "ls -lrt /root/ocpinst/manifests/"
register: manifests_list

- debug:
msg: "{{ manifests_list }}"


- name: Set masters schedulable parameter to false
tags: get_ocp
become: true
Expand Down