2021-02-13 16:18:29 +01:00
|
|
|
---
|
2021-11-24 11:54:31 +01:00
|
|
|
- name: include user tasks
|
|
|
|
include_tasks: user.yml
|
|
|
|
|
|
|
|
- name: template script
|
2021-02-13 16:18:29 +01:00
|
|
|
become: yes
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: zfs-health.sh
|
|
|
|
dest: /usr/local/bin/zfs-health.sh
|
2021-11-24 11:54:31 +01:00
|
|
|
mode: 0744
|
|
|
|
owner: "{{ zfs_health_user }}"
|
|
|
|
group: "{{ zfs_health_user_group }}"
|
2021-02-13 16:18:29 +01:00
|
|
|
|
2021-11-24 11:54:31 +01:00
|
|
|
- name: ensure cronjob exists
|
2021-02-13 16:18:29 +01:00
|
|
|
become: yes
|
|
|
|
ansible.builtin.cron:
|
2021-11-24 11:54:31 +01:00
|
|
|
name: zfs_health
|
2021-02-13 16:18:29 +01:00
|
|
|
state: present
|
|
|
|
job: "/usr/local/bin/zfs-health.sh"
|
|
|
|
minute: "{{ zfs_extra_cron_minutes_zfs_health }}"
|
|
|
|
hour: "{{ zfs_extra_cron_hours_zfs_health }}"
|
2021-11-24 11:54:31 +01:00
|
|
|
user: "{{ zfs_health_user }}"
|