24 lines
426 B
YAML
24 lines
426 B
YAML
|
- name: Install smartmontools
|
||
|
apt:
|
||
|
name: smartmontools
|
||
|
|
||
|
- name: Smartd configuration
|
||
|
copy:
|
||
|
src: ./root/etc/smartd.conf
|
||
|
dest: /etc/smartd.conf
|
||
|
mode: 0644
|
||
|
register: smartd_conf
|
||
|
|
||
|
- name: Enable/start smartmontools
|
||
|
systemd:
|
||
|
name: smartmontools
|
||
|
enabled: yes
|
||
|
state: started
|
||
|
|
||
|
- name: Restart smartmontools
|
||
|
systemd:
|
||
|
name: smartmontools
|
||
|
state: restarted
|
||
|
when:
|
||
|
smartd_conf is changed
|