Fix location of zpool
command
TIL lookups are executed on the host
This commit is contained in:
parent
3de14efd9e
commit
909f693cba
1 changed files with 9 additions and 1 deletions
|
@ -5,11 +5,19 @@
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
|
- name: Locate zpool command
|
||||||
|
command:
|
||||||
|
cmd: which zpool
|
||||||
|
strip_empty_ends: true
|
||||||
|
register: which_zpool
|
||||||
|
changed_when: false
|
||||||
|
become: true
|
||||||
|
|
||||||
- name: ZFS Scrub
|
- name: ZFS Scrub
|
||||||
cron:
|
cron:
|
||||||
name: scrub {{ item }} ZFS pool
|
name: scrub {{ item }} ZFS pool
|
||||||
special_time: weekly
|
special_time: weekly
|
||||||
job: "{{ lookup('pipe', 'which zpool') }} scrub {{ item }}"
|
job: "{{ which_zpool.stdout }} scrub {{ item }}"
|
||||||
become: true
|
become: true
|
||||||
loop: "{{ zpools_to_scrub }}"
|
loop: "{{ zpools_to_scrub }}"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue