Skip to content

Instantly share code, notes, and snippets.

@hagbarddenstore
Created November 10, 2015 14:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hagbarddenstore/390956a0ec950d66a16b to your computer and use it in GitHub Desktop.
Save hagbarddenstore/390956a0ec950d66a16b to your computer and use it in GitHub Desktop.
- name: check which plugins are installed
stat:
path="/usr/share/elasticsearch/plugins/{{ item }}/"
with_items:
- license
- marvel-agent
register: installed_plugins
tags: plugins
- name: install plugins
shell: "/usr/share/elasticsearch/bin/plugin install {{ item.item }}"
when: item.stat.exists == False
with_items: installed_plugins.results
notify: restart elasticsearch
tags: plugins
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment