summaryrefslogtreecommitdiffstats
path: root/roles/diagnostics/templates/diskcheck.sh.j2
blob: 50021a630011a2b44317ace164d8ed69d99f9e37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/bash


{% if ansible_devices.sda is defined and ansible_devices.sda.removable == "0" and ansible_devices.sda.rotational == "1" %}
smartctl -t long /dev/sda
{% endif %}
{% if ansible_devices.sdb is defined and ansible_devices.sdb.removable == "0" and ansible_devices.sdb.rotational == "1" %}
smartctl -t long /dev/sdb
{% endif %}
{% if ansible_devices.sdc is defined and ansible_devices.sdc.removable == "0" and ansible_devices.sdc.rotational == "1" %}
smartctl -t long /dev/sdc
{% endif %}
{% if ansible_devices.sdd is defined and ansible_devices.sdd.removable == "0" and ansible_devices.sdd.rotational == "1" %}
smartctl -t long /dev/sdd
{% endif %}