---

- include_role:
    name: evolix/remount-usr

- name: shell script
  copy:
    src: files/check_free_space.sh
    dest: /usr/share/scripts/check_free_space
    owner: root
    group: root
    mode: "0750"

- name: email template
  copy:
    src: files/check_free_space.tpl
    dest: /usr/share/scripts/check_free_space.tpl
    owner: root
    group: root
    mode: "0644"

# not using the cron_module for this since it is buggy
- name: cron
  template:
    src: templates/cron_check_free_space.j2
    dest: /etc/cron.d/check_free_space
    owner: root
    group: root
    mode: "0644"
    force: false
