mirror of
https://github.com/openshift/community.okd.git
synced 2026-03-26 19:03:14 +00:00
fix ocp auth adding / to oauth discovery url (#140)
* fix ocp auth adding / to oauth discovery url * fix space after comma * add changelog fragment * Convert line endings Co-authored-by: Mike Graves <mgraves@redhat.com>
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
bugfixes:
|
||||
- fix ocp auth failing against cluster api url with trailing slash (https://github.com/openshift/community.okd/issues/139)
|
||||
@@ -171,6 +171,7 @@ import traceback
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.six.moves.urllib_parse import urlparse, parse_qs, urlencode
|
||||
from urllib.parse import urljoin
|
||||
|
||||
# 3rd party imports
|
||||
try:
|
||||
@@ -266,7 +267,7 @@ class OpenShiftAuthModule(AnsibleModule):
|
||||
self.exit_json(changed=False, openshift_auth=result, k8s_auth=result)
|
||||
|
||||
def openshift_discover(self):
|
||||
url = '{0}/.well-known/oauth-authorization-server'.format(self.con_host)
|
||||
url = urljoin(self.con_host, '.well-known/oauth-authorization-server')
|
||||
ret = requests.get(url, verify=self.con_verify_ca)
|
||||
|
||||
if ret.status_code != 200:
|
||||
|
||||
Reference in New Issue
Block a user