arensb.truenas.smart module – Configure S.M.A.R.T. service

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.

New in arensb.truenas 1.8.0

Synopsis

  • Configure the S.M.A.R.T. service.

  • To turn on the S.M.A.R.T. service and make sure it starts at boot time, see service.

  • This module does not schedule S.M.A.R.T. scans. That is done by smart_scan.

Parameters

Parameter

Comments

interval

integer

Time in minutes between S.M.A.R.T. tests.

Technically, this is how often smartd activates to check whether any tests are configured to run.

power_mode

string

Selects the power mode. Options are never, sleep, standby, and idle. These correspond to the -n POWERMODE option to smartd.

never: Check the device regardless of its power mode.

sleep: Check the device unless it is in sleep mode.

standby: Check the device unless it is in sleep or standby mode.

idle: Check the device unless it is in sleep, standby, or idle mode.

Choices:

  • "NEVER"

  • "SLEEP"

  • "STANDBY"

  • "IDLE"

temp_crit

integer

Threshold temperature, in degrees Celsius.

If a disk goes above this temperature, SMART will generate a message with log level of LOG_CRIT.

Set to 0 to disable this behavior.

temp_difference

integer

Significant temperature difference. A report will be generated if the temperature is more than temp_difference degrees Celsius different from the last test.

Set to 0 to disable this behavior.

temp_info

integer

Threshold temperature, in degrees Celsius.

If a disk goes above this temperature, SMART will generate a message with log level of LOG_INFO.

Set to 0 to disable this behavior.

Examples

- name: Configure S.M.A.R.T. service
  hosts: myhost
  become: yes
  tasks:
    - arensb.truenas.smart:
        power_mode: never
        # Generate report if a disk is 2 degrees hotter or cooler than
        # last time.
        temp_difference: 2
        # Generate a LOG_INFO message if a disk goes above 40 degrees.
        temp_info: 40
        # Generate a LOG_CRIT message if a disk goes above 45 degrees.
        temp_crit: 45

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

status

string

A data structure giving the current state of the S.M.A.R.T. service, after this module has made changes.

Returned: success