summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-01-26 09:45:40 -0500
committerGitHub <noreply@github.com>2017-01-26 09:45:40 -0500
commit0dcb6f17107ab6d726e7c22ab379387f145dc993 (patch)
tree9c3c96b4f674f34a1ae47cff34231d8251ea153d /roles
parent824e3a669e4683c3baf94d8f9eee168bc68afcb1 (diff)
parent944a9b750f3765df0a204b930fe57923ca58d25d (diff)
downloadopenshift-0dcb6f17107ab6d726e7c22ab379387f145dc993.tar.gz
openshift-0dcb6f17107ab6d726e7c22ab379387f145dc993.tar.bz2
openshift-0dcb6f17107ab6d726e7c22ab379387f145dc993.tar.xz
openshift-0dcb6f17107ab6d726e7c22ab379387f145dc993.zip
Merge pull request #2973 from AlbertoPeon/metrics_url
Set metrics url even if metrics_deploy is false
Diffstat (limited to 'roles')
-rw-r--r--roles/openshift_hosted_metrics/tasks/install.yml2
-rw-r--r--roles/openshift_master/templates/master.yaml.v1.j24
-rw-r--r--roles/openshift_master_facts/tasks/main.yml5
3 files changed, 5 insertions, 6 deletions
diff --git a/roles/openshift_hosted_metrics/tasks/install.yml b/roles/openshift_hosted_metrics/tasks/install.yml
index 2c839996e..6a442cefc 100644
--- a/roles/openshift_hosted_metrics/tasks/install.yml
+++ b/roles/openshift_hosted_metrics/tasks/install.yml
@@ -128,5 +128,5 @@
modify_yaml:
dest: "{{ openshift.common.config_base }}/master/master-config.yaml"
yaml_key: assetConfig.metricsPublicURL
- yaml_value: "{{ openshift_hosted_metrics_public_url }}"
+ yaml_value: "{{ openshift_hosted_metrics_deploy_url }}"
notify: restart master
diff --git a/roles/openshift_master/templates/master.yaml.v1.j2 b/roles/openshift_master/templates/master.yaml.v1.j2
index fcb8125e9..cf7ceacff 100644
--- a/roles/openshift_master/templates/master.yaml.v1.j2
+++ b/roles/openshift_master/templates/master.yaml.v1.j2
@@ -15,8 +15,8 @@ assetConfig:
{% if 'logging_public_url' in openshift.master %}
loggingPublicURL: {{ openshift.master.logging_public_url }}
{% endif %}
-{% if openshift_hosted_metrics_deploy | default(false) | bool %}
- metricsPublicURL: {{ openshift_hosted_metrics_public_url }}
+{% if openshift_hosted_metrics_deploy_url is defined %}
+ metricsPublicURL: {{ openshift_hosted_metrics_deploy_url }}
{% endif %}
{% if 'extension_scripts' in openshift.master %}
extensionScripts: {{ openshift.master.extension_scripts | to_padded_yaml(1, 2) }}
diff --git a/roles/openshift_master_facts/tasks/main.yml b/roles/openshift_master_facts/tasks/main.yml
index 0dba4b3ba..74885d713 100644
--- a/roles/openshift_master_facts/tasks/main.yml
+++ b/roles/openshift_master_facts/tasks/main.yml
@@ -21,11 +21,10 @@
g_metrics_hostname: "{{ openshift_hosted_metrics_public_url
| default('hawkular-metrics.' ~ (openshift_master_default_subdomain))
| oo_hostname_from_url }}"
- when: openshift_hosted_metrics_deploy | default(false) | bool
- set_fact:
- openshift_hosted_metrics_public_url: "https://{{ g_metrics_hostname }}/hawkular/metrics"
- when: openshift_hosted_metrics_deploy | default(false) | bool
+ openshift_hosted_metrics_deploy_url: "https://{{ g_metrics_hostname }}/hawkular/metrics"
+ when: (openshift_hosted_metrics_deploy | default(false) | bool) or (openshift_hosted_metrics_public_url is defined)
- name: Set master facts
openshift_facts: