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

- name: Rules
  template:
    src='rule.yaml'
    dest='/opt/elastalert/my_rules/{{ item.key }}.yaml'
    owner='root'
    group='root'
    mode='644'
  with_items: '{{ elastalerts|default([]) }}'
  tags:
    - Rules
