Skip to content

Commit

Permalink
Merge pull request #32 from mareklibra/fix.masterUrl
Browse files Browse the repository at this point in the history
Fix for missing masterUrl
  • Loading branch information
mareklibra authored Mar 25, 2019
2 parents 7da3c2f + 26f21ef commit 6df7e51
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
path: "{{ mktemp.stdout }}/{{ __console_config_file }}"
regexp: "^ masterPublicURL:.*$"
line: " masterPublicURL: '{{ openshift_master_public_api_url }}'"
when: openshift_master_public_api_url | default("") | string != ""
- name: Change oauthEndpointCAFile
lineinfile:
path: "{{ mktemp.stdout }}/{{ __console_config_file }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
dest: "{{ mktemp.stdout }}/{{ __console_config_file }}"
when: existing_config_map_data['console-config.yaml'] is defined

- set_fact:
# Must have a trailing slash
console_picker_developer_console_public_url: "{{ openshift_master_public_console_url }}/"
when: (openshift_web_console_enable_context_selector | default(true) | bool) and (openshift_web_console_install | default(true) | bool)
#- set_fact:
# # Must have a trailing slash
# console_picker_developer_console_public_url: "{{ openshift_master_public_console_url }}/"
# when: (openshift_web_console_enable_context_selector | default(true) | bool) and (openshift_web_console_install | default(true) | bool)

- set_fact: console_cert={{ lookup('file', kubevirt_web_ui_cert) }}
when: kubevirt_web_ui_cert is exists
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
when: public_master_hostname | default("") | string == "" and parsedMasterPublicURL.stdout != ""

- name: Discover openshift_master_default_subdomain from openshift console deployment
shell: "{{ openshift_client_binary }} get configmap console-config -n openshift-console -o jsonpath='{.data}' | grep 'consoleBaseAddress:' | sed 's/^.*consoleBaseAddress: *http.*:\\/\\/console\\.//g'"
shell: "{{ openshift_client_binary }} get configmap console-config -n openshift-console -o jsonpath='{.data}' | grep 'consoleBaseAddress:' | sed 's/^[^\\.]*\\.//g'"
register: parsedBaseAddress
when: openshift_master_default_subdomain | default("") | string == ""

Expand All @@ -41,7 +41,8 @@
- set_fact: kubevirt_web_ui_hostname="kubevirt-web-ui.{{openshift_master_default_subdomain}}"

# Mimic openshift-ansible
- set_fact: openshift_master_public_console_url="https://{{ public_master_hostname }}/console" # Example: https://master.mycluster.com:8443/console
# - set_fact: openshift_master_public_console_url="https://{{ public_master_hostname }}/console" # Example: https://master.mycluster.com:8443/console
- set_fact: openshift_master_public_api_url="https://{{ public_master_hostname }}"
when: public_master_hostname | default("") | string != ""
- set_fact: openshift_master_logout_url="" # TODO: not needed so far

0 comments on commit 6df7e51

Please sign in to comment.