arensb.truenas.smart_test_task module – Schedule S.M.A.R.T. tests
Note
This module is part of the arensb.truenas collection (version 1.11.4).
To install it, use: ansible-galaxy collection install arensb.truenas
.
To use it in a playbook, specify: arensb.truenas.smart_test_task
.
New in arensb.truenas 1.8.0
Synopsis
Schedule S.M.A.R.T. tests under “Tasks”.
Parameters
Parameter |
Comments |
---|---|
Day of month when the task should run, in cron format. This is a comma-separated list of integer ranges, e.g., “10”, “1-5”, “1,3,7-10”. |
|
List of disk devices to check, e.g., “da0”. The special value “ALL” means to check all disks. |
|
Hour when the task should run, in cron format. This is a comma-separated list of integer ranges. |
|
This parameter is ignored, and exists only for compatibility with builtin.cron. |
|
Month when the task should run, in cron format. This is a comma-separated list of month names or numbers, e.g., “jan,feb,mar”. |
|
Name of the test. This must be unique across S.M.A.R.T. test tasks, since it effectively acts as an identifier. |
|
Whether the task should exist or not. Choices:
|
|
The test to perform. Choices are “long”, “short”, “conveyance”, and “offline”. Choices:
|
|
Day of week when the task should run, in cron format. This is a comma-separated list of day numbers of abbreviations, e.g. “1”, “1,5”, “sun,mon”. |
Examples
- name: Run a SHORT test every month
hosts: my-truenas-server
tasks:
- arensb.truenas.smart_test_task:
name: "Monthly job"
disks: ALL
test: short
hour: 13
day: 1
month: "*"
- name: Run a SHORT test twice a month on some disks
hosts: my-truenas-server
tasks:
- arensb.truenas.smart_test_task:
name: "Bimonthly job on ada0, ada1"
disks:
- ada0
- ada1
test: short
hour: 3
day: 1,15
month: "*"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
A structure describing a newly-created task. Returned: Success, when created. |