Fix location of zpool command

TIL lookups are executed on the host
This commit is contained in:
Jake Howard 2021-01-26 22:02:58 +00:00
parent 3de14efd9e
commit 909f693cba
Signed by: jake
GPG Key ID: 57AFB45680EDD477

View File

@ -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 }}"