Skip to content

Commit 8fb9024

Browse files
suman-jainkerirootjpattararootroot
authored
Changes to enable IPSEC Network Configuration (#395)
This PR handles the changes to enable IPSEC Network Config changes during the installation. - The boolean flag - **ipsec_enabled** - is added in the all.yaml to enable IPSEC configuration. Default value if False. - Maintain the Network config manifest - **cluster-network-03-config.yml** - in the **files/** directory of **get_ocp** role. - After the manifests are created, an additional Network manifest - **cluster-network-03-config.yml** - which has the configuration for enabling IPSEC is copied to the manifests directory, only when **ipsec_enabled flag is True**. --------- Signed-off-by: suman-jainkeri <[email protected]> Signed-off-by: root <[email protected]> Co-authored-by: root <[email protected]> Co-authored-by: jpattara <[email protected]> Co-authored-by: root <[email protected]> Co-authored-by: root <[email protected]>
1 parent 554975b commit 8fb9024

File tree

4 files changed

+31
-0
lines changed

4 files changed

+31
-0
lines changed

docs/set-variables-group-vars.md

+1
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@
166166
**env.jumphost.user** | (Optional) The user name to login to the jumphost. | admin
167167
**env.jumphost.pass** | (Optional) The password for user to login to the jumphost. | ch4ngeMe!
168168
**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
169+
**env.ipsec_enabled** | (Optional) If IPSEC network configuration has to be enabled, this flag should be set to true |
169170

170171
## 12 - OCP and RHCOS (CoreOS)
171172
* 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:

inventories/default/group_vars/all.yaml.template

+3
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,9 @@ env:
201201
use_dhcp: False
202202
setup_openvpn: False
203203

204+
# Uncomment the line below to enable IPSec network configuration.
205+
# ipsec_enabled: true
206+
204207
#jumphost if network mode is NAT
205208
jumphost:
206209
name:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
apiVersion: operator.openshift.io/v1
2+
kind: Network
3+
metadata:
4+
name: cluster
5+
spec:
6+
defaultNetwork:
7+
ovnKubernetesConfig:
8+
ipsecConfig:
9+
mode: Full

roles/get_ocp/tasks/main.yaml

+18
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,24 @@
9292
/root/ocpinst/openshift-install create manifests --dir=/root/ocpinst/
9393
become: true
9494

95+
- name: Copy the file when ipsec flag is enabled
96+
tags: get_ocp
97+
become: true
98+
copy:
99+
src: cluster-network-03-config.yml
100+
dest: /root/ocpinst/manifests/cluster-network-03-config.yml
101+
when: env.ipsec_enabled is defined and env.ipsec_enabled != None and env.ipsec_enabled
102+
103+
- name: List the files in the manifests directory
104+
tags: get_ocp
105+
become: true
106+
command: "ls -lrt /root/ocpinst/manifests/"
107+
register: manifests_list
108+
109+
- debug:
110+
msg: "{{ manifests_list }}"
111+
112+
95113
- name: Set masters schedulable parameter to false
96114
tags: get_ocp
97115
become: true

0 commit comments

Comments
 (0)