Commit 4c93e4d2 by e0d

updating to use stat module.

parent 7a171023
...@@ -71,16 +71,16 @@ ...@@ -71,16 +71,16 @@
when: ELASTICSEARCH_CLUSTERED when: ELASTICSEARCH_CLUSTERED
# Plugin installation fails hard when the plugin already # Plugin installation fails hard when the plugin already
# exists. This is problematic of this is upgraded. # exists. This is problematic if this is upgraded.
- name: check if the bigdesk plugin is installed - name: check if the bigdesk plugin is installed
command: test -d /usr/share/elasticsearch/plugins/bigdesk stat: path=/usr/share/elasticsearch/plugins/bigdesk
ignore_errors: true register: bigdesk
register: bigdesk_present
- name: install bigdesk plugin - name: install bigdesk plugin
shell: > shell: >
/usr/share/elasticsearch/bin/plugin -install lukas-vlcek/bigdesk/2.2.0 /usr/share/elasticsearch/bin/plugin -install lukas-vlcek/bigdesk/2.2.0
when: bigdesk_present|failed when: bigdesk.stat.isdir is defined and bigdesk.stat.isdir == false
- name: Ensure elasticsearch is enabled and started - name: Ensure elasticsearch is enabled and started
service: name=elasticsearch state=restarted enabled=yes service: name=elasticsearch state=restarted enabled=yes
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment