summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason DeTiberus <detiber@gmail.com>2017-01-24 23:19:40 -0500
committerGitHub <noreply@github.com>2017-01-24 23:19:40 -0500
commita181ed47b39e2a26057ccfb5e5c37a6bf14c1e6c (patch)
tree8486d5945a242388df7885ea7cdc1b19c198ed8a
parent60808d88521ada44948632825cadb7e9752c6d97 (diff)
parent21bc2458e585d3fb8b8fdbb0ca167ff1f242b9a8 (diff)
downloadopenshift-a181ed47b39e2a26057ccfb5e5c37a6bf14c1e6c.tar.gz
openshift-a181ed47b39e2a26057ccfb5e5c37a6bf14c1e6c.tar.bz2
openshift-a181ed47b39e2a26057ccfb5e5c37a6bf14c1e6c.tar.xz
openshift-a181ed47b39e2a26057ccfb5e5c37a6bf14c1e6c.zip
Merge pull request #3150 from jcantrill/bz_1415447_stop_heaster
Conditionally include metrics start/stop
-rw-r--r--roles/openshift_metrics/tasks/main.yaml7
1 files changed, 2 insertions, 5 deletions
diff --git a/roles/openshift_metrics/tasks/main.yaml b/roles/openshift_metrics/tasks/main.yaml
index c42440130..1808db5d5 100644
--- a/roles/openshift_metrics/tasks/main.yaml
+++ b/roles/openshift_metrics/tasks/main.yaml
@@ -7,6 +7,7 @@
- name: Create temp directory for all our templates
file: path={{mktemp.stdout}}/templates state=directory mode=0755
changed_when: False
+ when: "{{ openshift_metrics_install_metrics | bool }}"
- name: Copy the admin client config(s)
command: >
@@ -15,8 +16,4 @@
check_mode: no
tags: metrics_init
-- include: install_metrics.yaml
- when: openshift_metrics_install_metrics | default(false) | bool
-
-- include: uninstall_metrics.yaml
- when: not openshift_metrics_install_metrics | default(false) | bool
+- include: "{{ (openshift_metrics_install_metrics | bool) | ternary('install_metrics.yaml','uninstall_metrics.yaml') }}"