security.yml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. - name: Install auto upgrades package
  2. action: ${ansible_pkg_mgr} pkg=unattended-upgrades state=installed update_cache=yes
  3. when_boolean: ${with_auto_upgrade}
  4. - name: Configure auto upgrades
  5. action: template src=apt/auto-upgrades.j2 dest=/etc/apt/apt.conf.d/20auto-upgrades owner=root group=root mode=0644
  6. when_boolean: ${with_auto_upgrade}
  7. - name: Install logcheck packages
  8. action: ${ansible_pkg_mgr} pkg=${item} state=installed update_cache=yes
  9. with_items:
  10. - logcheck
  11. - logcheck-database
  12. when_boolean: ${with_logcheck}
  13. - name: Install local configuration files for logcheck
  14. action: copy src=logcheck/${item}_local dest=/etc/logcheck/ignore.d.server/${item}_local owner=root group=root mode=0644
  15. with_items:
  16. - ansible
  17. - amavisd-new
  18. - bind
  19. - dovecot
  20. - dropbear
  21. - git-daemon
  22. - ipmi
  23. - kernel
  24. - libpam-modules
  25. - mon
  26. - noip2
  27. - ntp
  28. - openvpn
  29. - php
  30. - postfix
  31. - pure-ftpd
  32. - redir
  33. - rsyslog
  34. - smartd
  35. - spamd
  36. - sshd
  37. - svn
  38. - sympa
  39. when_boolean: ${with_logcheck}
  40. - name: Update logcheck cron job
  41. action: template src=cron/logcheck.j2 dest=/etc/cron.d/logcheck owner=root group=root mode=0644
  42. when_boolean: ${with_logcheck}
  43. - name: Update rkhunter default/init parameters
  44. action: template src=rkhunter/default.j2 dest=/etc/default/rkhunter owner=root group=root mode=0644
  45. when_boolean: ${with_rkhunter}
  46. - name: Update rkhunter configuration
  47. action: template src=rkhunter/${ansible_lsb.codename}.conf.j2 dest=/etc/rkhunter.conf owner=root group=root mode=0644
  48. when_boolean: ${with_rkhunter}
  49. - name: Update chkrootkit configuration
  50. action: template src=chkrootkit/chkrootkit.conf.j2 dest=/etc/chkrootkit.conf owner=root group=root mode=0644
  51. when_boolean: ${with_chkrootkit}