Skip to content

Commit

Permalink
Updating default behavior for installing metrics and logging. Separat…
Browse files Browse the repository at this point in the history
…ing out uninstall to own variable
  • Loading branch information
ewolinetz committed Sep 22, 2017
1 parent 9240e0d commit 660bafe
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
3 changes: 2 additions & 1 deletion roles/openshift_logging/defaults/main.yml
Expand Up @@ -7,7 +7,8 @@ openshift_logging_nodeselector: null
openshift_logging_labels: {}
openshift_logging_label_key: ""
openshift_logging_label_value: ""
openshift_logging_install_logging: True
openshift_logging_install_logging: False
openshift_logging_uninstall_logging: False

openshift_logging_purge_logging: False
openshift_logging_image_pull_secret: ""
Expand Down
9 changes: 5 additions & 4 deletions roles/openshift_logging/tasks/main.yaml
Expand Up @@ -30,12 +30,13 @@
check_mode: no
become: no

- include: "{{ role_path }}/tasks/install_logging.yaml"
when: openshift_logging_install_logging | default(false) | bool
- include: install_logging.yaml
when:
- openshift_logging_install_logging | default(false) | bool

- include: "{{ role_path }}/tasks/delete_logging.yaml"
- include: delete_logging.yaml
when:
- not openshift_logging_install_logging | default(false) | bool
- openshift_logging_uninstall_logging | default(false) | bool

- name: Cleaning up local temp dir
local_action: file path="{{local_tmp.stdout}}" state=absent
Expand Down
3 changes: 2 additions & 1 deletion roles/openshift_metrics/defaults/main.yaml
@@ -1,6 +1,7 @@
---
openshift_metrics_start_cluster: True
openshift_metrics_install_metrics: True
openshift_metrics_install_metrics: False
openshift_metrics_uninstall_metrics: False
openshift_metrics_startup_timeout: 500

openshift_metrics_hawkular_replicas: 1
Expand Down
8 changes: 7 additions & 1 deletion roles/openshift_metrics/tasks/main.yaml
Expand Up @@ -43,7 +43,13 @@
check_mode: no
tags: metrics_init

- include: "{{ (openshift_metrics_install_metrics | bool) | ternary('install_metrics.yaml','uninstall_metrics.yaml') }}"
- include: install_metrics.yaml
when:
- openshift_metrics_install_metrics | default(false) | bool

- include: uninstall_metrics.yaml
when:
- openshift_metrics_uninstall_metrics | default(false) | bool

- include: uninstall_hosa.yaml
when: not openshift_metrics_install_hawkular_agent | bool
Expand Down

0 comments on commit 660bafe

Please sign in to comment.