diff options
author | Eric Wolinetz <ewolinet@redhat.com> | 2017-12-05 17:08:57 -0600 |
---|---|---|
committer | Eric Wolinetz <ewolinet@redhat.com> | 2017-12-14 13:30:33 -0600 |
commit | 1b9c54b63f6d33b0a612e1a35503d2027745888d (patch) | |
tree | 490fba72a7fca806ed4905ccd4cdeabbc991d7a6 /roles/openshift_logging_elasticsearch/tasks/main.yaml | |
parent | 466a4b9e06ee4b77cd347fdb960f930ed6c03c8e (diff) | |
download | openshift-1b9c54b63f6d33b0a612e1a35503d2027745888d.tar.gz openshift-1b9c54b63f6d33b0a612e1a35503d2027745888d.tar.bz2 openshift-1b9c54b63f6d33b0a612e1a35503d2027745888d.tar.xz openshift-1b9c54b63f6d33b0a612e1a35503d2027745888d.zip |
Removing config trigger for ES DC, updating to use a handler to rollout ES at the end of a deployment, allowing for override with variable
Diffstat (limited to 'roles/openshift_logging_elasticsearch/tasks/main.yaml')
-rw-r--r-- | roles/openshift_logging_elasticsearch/tasks/main.yaml | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/roles/openshift_logging_elasticsearch/tasks/main.yaml b/roles/openshift_logging_elasticsearch/tasks/main.yaml index 8f2050043..5fe683ae5 100644 --- a/roles/openshift_logging_elasticsearch/tasks/main.yaml +++ b/roles/openshift_logging_elasticsearch/tasks/main.yaml @@ -204,7 +204,21 @@ from_file: elasticsearch.yml: "{{ tempdir }}/elasticsearch.yml" logging.yml: "{{ tempdir }}/elasticsearch-logging.yml" + register: es_config_creation + notify: "restart elasticsearch" +- when: es_config_creation.changed | bool + block: + - set_fact: + _restart_logging_components: "{{ _restart_logging_components | default([]) + [es_component] | unique }}" + + - shell: > + oc get dc -l component="{{ es_component }}" -n "{{ openshift_logging_elasticsearch_namespace }}" -o name | cut -d'/' -f2 + register: _es_dcs + + - set_fact: + _restart_logging_nodes: "{{ _restart_logging_nodes | default([]) + [_es_dcs.stdout] | unique }}" + when: _es_dcs.stdout != "" # secret - name: Set ES secret @@ -375,6 +389,13 @@ files: - "{{ tempdir }}/templates/logging-es-dc.yml" delete_after: true + register: es_dc_creation + notify: "restart elasticsearch" + +- set_fact: + _restart_logging_components: "{{ _restart_logging_components | default([]) + [es_component] | unique }}" + _restart_logging_nodes: "{{ _restart_logging_nodes | default([]) + [es_deploy_name] | unique }}" + when: es_dc_creation.changed | bool - name: Retrieving the cert to use when generating secrets for the {{ es_component }} component slurp: |