Skip to content

Instantly share code, notes, and snippets.

@alex-zel
Created November 21, 2016 12:48
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 alex-zel/ad784cbaa749836126ba48c0fff6a393 to your computer and use it in GitHub Desktop.
Save alex-zel/ad784cbaa749836126ba48c0fff6a393 to your computer and use it in GitHub Desktop.
'restart elasticsearch':
service.running:
- name: 'elasticsearch'
- enable: True
- reload: True
'migrate roles':
cmd.run:
- name: '/usr/share/elasticsearch/bin/x-pack/migrate native -U http://localhost:9200 -u "{{ elastic_user }}" -p "{{ elastic_password }}" --config /etc/elasticsearch/x-pack/roles.yml'
- onfail:
- service: 'restart elasticsearch'
- require:
- '/usr/share/elasticsearch/config'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment