Skip to content
This repository has been archived by the owner on Dec 9, 2020. It is now read-only.

Commit

Permalink
Merge pull request #896 from vponomaryov/auth_type
Browse files Browse the repository at this point in the history
[VMWare] Fix oauth config for OCP installation
  • Loading branch information
dav1x authored Jan 2, 2018
2 parents 8ffc9f0 + 6048cad commit fa05d56
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions reference-architecture/vmware-ansible/ocp-on-vmware.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,16 @@ def _create_ocp_vars(self):
if not self.no_confirm:
click.confirm('Continue using these values?', abort=True)

if self.auth_type == 'ldap':
if self.auth_type == 'none':
playbooks = ["playbooks/ocp-install.yaml", "playbooks/minor-update.yaml"]
for ocp_file in playbooks:
for line in fileinput.input(ocp_file, inplace=True):
if line.startswith('#openshift_master_identity_providers:'):
line = line.replace('#', ' ')
print line
else:
print line,
elif self.auth_type == 'ldap':
l_bdn = ""

for d in self.ldap_fqdn.split("."):
Expand Down Expand Up @@ -550,15 +559,11 @@ def _create_ocp_vars(self):
else:
print line,

if self.auth_type == 'none':
playbooks = ["playbooks/ocp-install.yaml", "playbooks/minor-update.yaml"]
for ocp_file in playbooks:
for line in fileinput.input(ocp_file, inplace=True):
if line.startswith('#openshift_master_identity_providers:'):
line = line.replace('#', ' ')
print line
else:
print line,
else:
print ("'auth_type' configuration has improper value '%s'. "
"It is allowed to be either "
"'ldap' or 'none'." % self.auth_type)
exit(1)
if self.args.create_ocp_vars:
exit(0)

Expand Down

0 comments on commit fa05d56

Please sign in to comment.