security.yml 1.4 KB

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