smartd.yml 754 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. - name: 'Install smartmontools package'
  2. apt:
  3. pkg:
  4. - 'smartmontools'
  5. state: 'present'
  6. tags:
  7. - 'smartd'
  8. - name: 'Install smartd configuration'
  9. template:
  10. src: 'smartd/smartd.conf.j2'
  11. dest: '/etc/smartd.conf'
  12. owner: 'root'
  13. group: 'root'
  14. mode: '0644'
  15. notify:
  16. - 'Restart smartmontools'
  17. tags:
  18. - 'smartd'
  19. - name: 'Update smartmontools default/init parameters'
  20. template:
  21. src: 'smartd/default.j2'
  22. dest: '/etc/default/smartmontools'
  23. owner: 'root'
  24. group: 'root'
  25. mode: '0644'
  26. notify:
  27. - 'Restart smartmontools'
  28. tags:
  29. - 'smartd'
  30. - name: 'Ensure smartmontools is running'
  31. service:
  32. name: 'smartmontools'
  33. state: 'started'
  34. tags:
  35. - 'smartd'
  36. # vim: ft=yaml.ansible