mirror of
https://github.com/RWejlgaard/pez-infra.git
synced 2026-05-06 04:14:43 +00:00
- New zfs role with cron-based scrub scheduling for Linux and FreeBSD - Weekly Sunday scrubs at noon (matching existing manual crons) - Add zfs_hosts inventory group with london-a and london-b - Configure zfs_pools per host: zroot (london-a), hdd (london-b) - Add Prometheus alert rules for degraded/faulted/offline pools - Add zfs.yml playbook for targeted deploys Captures the previously untracked scrub cron on london-a and re-enables the commented-out scrub on london-b. Refs: PESO-93
29 lines
1,004 B
YAML
29 lines
1,004 B
YAML
---
|
|
# ZFS management: scrub scheduling, pool monitoring.
|
|
# Supports both Linux (systemd timers / cron) and FreeBSD (crontab).
|
|
|
|
- name: "ZFS scrub scheduling (Linux)"
|
|
when: ansible_os_family != "FreeBSD" and zfs_scrub_enabled
|
|
block:
|
|
- name: Install ZFS scrub cron jobs (Linux)
|
|
ansible.builtin.cron:
|
|
name: "ZFS scrub {{ item }}"
|
|
minute: "{{ zfs_scrub_minute }}"
|
|
hour: "{{ zfs_scrub_hour }}"
|
|
weekday: "{{ zfs_scrub_weekday }}"
|
|
job: "/sbin/zpool scrub {{ item }}"
|
|
user: root
|
|
loop: "{{ zfs_pools }}"
|
|
|
|
- name: "ZFS scrub scheduling (FreeBSD)"
|
|
when: ansible_os_family == "FreeBSD" and zfs_scrub_enabled
|
|
block:
|
|
- name: Install ZFS scrub cron jobs (FreeBSD)
|
|
ansible.builtin.cron:
|
|
name: "ZFS scrub {{ item }}"
|
|
minute: "{{ zfs_scrub_minute }}"
|
|
hour: "{{ zfs_scrub_hour }}"
|
|
weekday: "{{ zfs_scrub_weekday }}"
|
|
job: "/sbin/zpool scrub {{ item }}"
|
|
user: root
|
|
loop: "{{ zfs_pools }}"
|