Skip to content
Snippets Groups Projects
main.yml 535 B
Newer Older
  • Learn to ignore specific revisions
  • ---
    # file: roles/elastalert/handlers/main.yml
    
    - name: "ElastAlert installation"
      shell: '{{ item }}'
      args:
        chdir: '/opt/elastalert'
      with_items:
        - 'python setup.py install'
        - '/usr/local/bin/elastalert-create-index --host "localhost" --port "9200" --no-auth --index "elastalert_status" --old-index ""'
    
    jurgenhaas's avatar
    jurgenhaas committed
    
    - name: "Add ElastAlert to Boot-List"
      systemd:
        name='elastalert'
        state='started'
        daemon_reload=yes
        enabled=yes
    
    - name: "Restart ElastAlert"
      service:
        name='elastalert'
        state='restarted'