add 'btrfs' role, move vars to host_vars

This commit is contained in:
Josh Lay 2024-03-23 11:53:01 -05:00
parent 13da397c76
commit 55d37e10ac
Signed by: jlay
GPG key ID: B265E45CACAD108A
7 changed files with 127 additions and 45 deletions

View file

@ -0,0 +1,10 @@
[Unit]
Description=Btrfs scrub on %f
ConditionPathIsMountPoint=%f
RequiresMountsFor=%f
[Service]
Nice=19
IOSchedulingClass=idle
KillSignal=SIGINT
ExecStart=/usr/bin/btrfs scrub start -B %f

View file

@ -0,0 +1,11 @@
[Unit]
Description=Monthly Btrfs scrub on %f
[Timer]
OnCalendar=monthly
AccuracySec=1d
RandomizedDelaySec=1w
Persistent=true
[Install]
WantedBy=timers.target