summaryrefslogtreecommitdiffstats
path: root/roles/common/tasks/smart.yml
blob: 3e2e02d0077a3c2b7c7887910fad3592d2ac5f6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
- name: Install smartmontools
  # apt-listbugs complains due to #706909.
  apt: pkg=smartmontools

- name: Configure smartmontools
  lineinfile: dest=/etc/default/smartmontools
              regexp='^(\s*#)?\s*start_smartd='
              line='start_smartd=yes'
              owner=root group=root
              mode=0644

- name: Start smartd
  service: name=smartmontools state=started
  # smartd can be heavy on VMs, don't bother starting it up if it's down
  when: not (ansible_processor[0] | search("^QEMU Virtual CPU .*"))