2022-12-18 23:43:40 +01:00
|
|
|
---
|
2022-12-04 17:06:18 +01:00
|
|
|
- name: "scrub : zpool status mail script"
|
|
|
|
ansible.builtin.template:
|
2023-07-08 10:04:37 +02:00
|
|
|
src: "./scrub/systemd-mail-zpool-status"
|
2022-12-04 17:06:18 +01:00
|
|
|
dest: "/usr/local/sbin/systemd-mail-zpool-status"
|
|
|
|
mode: 0755
|
|
|
|
|
|
|
|
- name: "scrub : zfs scrub systemd service file"
|
|
|
|
ansible.builtin.copy:
|
|
|
|
src: "./scrub/zfs-scrub@.service"
|
|
|
|
dest: "/etc/systemd/system/zfs-scrub@.service"
|
|
|
|
mode: 0644
|
2022-12-08 23:19:54 +01:00
|
|
|
register: system_zfs_scrub_service_file
|
2022-12-04 17:06:18 +01:00
|
|
|
|
|
|
|
- name: "scrub : zfs scrub systemd timer file"
|
|
|
|
ansible.builtin.copy:
|
|
|
|
src: "./scrub/zfs-scrub-monthly@.timer"
|
|
|
|
dest: "/etc/systemd/system/zfs-scrub-monthly@.timer"
|
|
|
|
mode: 0644
|
2022-12-08 23:19:54 +01:00
|
|
|
register: system_zfs_scrub_monthly_timer_file
|
2022-12-04 17:06:18 +01:00
|
|
|
|
|
|
|
- name: "scrub : systemd daemon reload"
|
|
|
|
ansible.builtin.systemd:
|
|
|
|
daemon_reload: true
|
|
|
|
when:
|
2022-12-08 23:19:54 +01:00
|
|
|
system_zfs_scrub_service_file.changed or
|
|
|
|
system_zfs_scrub_monthly_timer_file.changed
|
2022-12-04 17:06:18 +01:00
|
|
|
|
|
|
|
- name: "scrub : enable and start timer for zfs scrub of {{ item }}"
|
|
|
|
ansible.builtin.systemd:
|
|
|
|
name: "zfs-scrub-monthly@{{ item }}.timer"
|
|
|
|
enabled: true
|
|
|
|
state: "started"
|
2022-12-08 23:19:54 +01:00
|
|
|
loop: "{{ system_zfs_zpools }}"
|