2022-09-11 20:55:30 +02:00
|
|
|
- name: Zpool status mail script
|
|
|
|
template:
|
2022-09-22 23:01:27 +02:00
|
|
|
src: ./filesystem/{{ ansible_hostname }}/usr/local/sbin/systemd-mail-zpool-status.j2
|
2022-09-11 20:55:30 +02:00
|
|
|
dest: /usr/local/sbin/systemd-mail-zpool-status
|
|
|
|
mode: 0755
|
|
|
|
|
|
|
|
- name: Zfs scrub service file
|
|
|
|
copy:
|
2022-09-22 23:01:27 +02:00
|
|
|
src: ./filesystem/{{ ansible_hostname }}/etc/systemd/system/zfs-scrub@.service
|
2022-09-11 20:55:30 +02:00
|
|
|
dest: /etc/systemd/system/zfs-scrub@.service
|
|
|
|
mode: 0644
|
|
|
|
register: systemd_zfs_scrub_service_file
|
|
|
|
|
|
|
|
- name: Zfs scrub timer file
|
|
|
|
copy:
|
2022-09-22 23:01:27 +02:00
|
|
|
src: ./filesystem/{{ ansible_hostname }}/etc/systemd/system/zfs-scrub-monthly@.timer
|
2022-09-11 20:55:30 +02:00
|
|
|
dest: /etc/systemd/system/zfs-scrub-monthly@.timer
|
|
|
|
mode: 0644
|
|
|
|
register: systemd_zfs_scrub_monthly_timer_file
|
|
|
|
|
|
|
|
- name: SystemD daemon reload
|
|
|
|
systemd:
|
|
|
|
daemon_reload: true
|
|
|
|
when:
|
|
|
|
systemd_zfs_scrub_service_file is changed or
|
|
|
|
systemd_zfs_scrub_monthly_timer_file is changed
|
|
|
|
|
|
|
|
- name: Enable zfs scrub of bpool
|
|
|
|
systemd:
|
|
|
|
name: zfs-scrub-monthly@bpool.timer
|
|
|
|
enabled: yes
|
|
|
|
state: started
|
|
|
|
|
|
|
|
- name: Enable zfs scrub of rpool
|
|
|
|
systemd:
|
|
|
|
name: zfs-scrub-monthly@rpool.timer
|
|
|
|
enabled: yes
|
|
|
|
state: started
|