homeserver/roles/mgrote.zfs_health/tasks/main.yml
mg 869131dabe change to script user: zfs_health (#253)
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: mg/ansible#253
Co-authored-by: mg <michael.grote@posteo.de>
Co-committed-by: mg <michael.grote@posteo.de>
2021-11-24 11:54:31 +01:00

23 lines
602 B
YAML

---
- name: include user tasks
include_tasks: user.yml
- name: template script
become: yes
ansible.builtin.template:
src: zfs-health.sh
dest: /usr/local/bin/zfs-health.sh
mode: 0744
owner: "{{ zfs_health_user }}"
group: "{{ zfs_health_user_group }}"
- name: ensure cronjob exists
become: yes
ansible.builtin.cron:
name: zfs_health
state: present
job: "/usr/local/bin/zfs-health.sh"
minute: "{{ zfs_extra_cron_minutes_zfs_health }}"
hour: "{{ zfs_extra_cron_hours_zfs_health }}"
user: "{{ zfs_health_user }}"