fix improve error handling in task

This commit is contained in:
Nicolas Lastra 2021-10-19 12:14:50 -03:00
parent af69658821
commit 4fa9a2de01
No known key found for this signature in database
GPG Key ID: 749E0D60DEC5E4D8

View File

@ -14,9 +14,13 @@
- name: Remove performance analyzer plugin from elasticsearch - name: Remove performance analyzer plugin from elasticsearch
become: true become: true
command: ./elasticsearch-plugin remove opendistro-performance-analyzer command: ./elasticsearch-plugin remove opendistro-performance-analyzer
ignore_errors: true
args: args:
chdir: /usr/share/elasticsearch/bin/ chdir: /usr/share/elasticsearch/bin/
register: remove_elasticsearch_performance_analyzer
failed_when:
- remove_elasticsearch_performance_analyzer.rc != 0
- '"not found" not in remove_elasticsearch_performance_analyzer.stderr'
changed_when: "remove_elasticsearch_performance_analyzer.rc == 0"
- name: Remove elasticsearch configuration file - name: Remove elasticsearch configuration file
file: file: