---
# file: roles/elastalert/tasks/install.yml

- name: Clone ElastAlert
  git:
    accept_hostkey: yes
    repo: 'https://github.com/bitsensor/elastalert.git'
    dest: /opt/elastalert
    force: yes
    version: '{{ elastalert_version }}'

- name: Pull docker image
  docker_image:
    name: bitsensor/elastalert:{{ elastalert_version }}
    source: pull
    force_source: yes
  notify:
    - Re-create the elastalert container
