smartd.yml 746 B

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