Skip to content
Snippets Groups Projects
Commit d733b842 authored by jurgenhaas's avatar jurgenhaas
Browse files

Improve for updates

parent 26bbb7d4
Branches
No related tags found
No related merge requests found
---
# file: roles/elastalert/handlers/main.yml
- name: "Add ElastAlert to Boot-List"
systemd:
name='elastalert'
state='started'
daemon_reload=yes
enabled=yes
- name: "ElastAlert installation"
shell: '{{ item }}'
args:
......@@ -15,3 +8,15 @@
with_items:
- 'python setup.py install'
- '/usr/local/bin/elastalert-create-index --host "localhost" --port "9200" --no-auth --index "elastalert_status" --old-index ""'
- name: "Add ElastAlert to Boot-List"
systemd:
name='elastalert'
state='started'
daemon_reload=yes
enabled=yes
- name: "Restart ElastAlert"
service:
name='elastalert'
state='restarted'
......@@ -8,19 +8,28 @@
dest: '/opt/elastalert'
force: yes
version: 'master'
notify:
- "ElastAlert installation"
- "Add ElastAlert to Boot-List"
- "Restart ElastAlert"
- name: "Install PIP Components"
pip:
name='{{ item }}'
state='present'
state='latest'
with_items:
- 'pip'
- 'setuptools'
- 'six'
notify:
- "Restart ElastAlert"
- name: "Install PIP Requirements"
pip:
requirements='/opt/elastalert/requirements.txt'
state='latest'
notify:
- "Restart ElastAlert"
- name: "Ensure Rules Directory"
file:
......@@ -29,9 +38,6 @@
owner='root'
group='root'
mode='755'
notify:
- "ElastAlert installation"
- "Add ElastAlert to Boot-List"
- name: "Configuration"
template:
......@@ -40,3 +46,5 @@
owner='root'
group='root'
mode='644'
notify:
- "Restart ElastAlert"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment