security.yml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. - libpam-modules
  16. - mon
  17. - noip2
  18. - ntp
  19. - openvpn
  20. - php
  21. - postfix
  22. - pure-ftpd
  23. - redir
  24. - rsyslog
  25. - smartd
  26. - spamd
  27. - sshd
  28. - svn
  29. - sympa
  30. when_boolean: ${with_logcheck}
  31. - name: Update logcheck cron job
  32. action: template src=cron/logcheck.j2 dest=/etc/cron.d/logcheck owner=root group=root mode=0644
  33. when_boolean: ${with_logcheck}
  34. - name: Update rkhunter default/init parameters
  35. action: template src=rkhunter/default.j2 dest=/etc/default/rkhunter owner=root group=root mode=0644
  36. when_boolean: ${with_rkhunter}
  37. - name: Update rkhunter configuration
  38. action: template src=rkhunter/${ansible_lsb.codename}.conf.j2 dest=/etc/rkhunter.conf owner=root group=root mode=0644
  39. when_boolean: ${with_rkhunter}
  40. - name: Update chkrootkit configuration
  41. action: template src=chkrootkit/chkrootkit.conf.j2 dest=/etc/chkrootkit.conf owner=root group=root mode=0644
  42. when_boolean: ${with_chkrootkit}