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"
|
||||
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
|
||||
cron:
|
||||
name: scrub {{ item }} ZFS pool
|
||||
special_time: weekly
|
||||
job: "{{ lookup('pipe', 'which zpool') }} scrub {{ item }}"
|
||||
job: "{{ which_zpool.stdout }} scrub {{ item }}"
|
||||
become: true
|
||||
loop: "{{ zpools_to_scrub }}"
|
||||
|
||||
|
|
Loading…
Reference in a new issue