Skip to content

Instantly share code, notes, and snippets.

@jdiez17
Created March 3, 2016 11:25
Show Gist options
  • Save jdiez17/a950df472ba3494dfd62 to your computer and use it in GitHub Desktop.
Save jdiez17/a950df472ba3494dfd62 to your computer and use it in GitHub Desktop.
- include: service.yaml
with_items:
- elasticsearch
- logstash
- kibana
- mongo
- postgres
- name: Install {{ item }}
copy: src={{ item }}.service dest=/etc/systemd/system
register: service
- name: Reload systemd
command: systemctl daemon-reload
when: service.changed
- name: Restart {{ item }}
service: name={{ item }} state=restarted
when: service.changed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment