security.yml 1.7 KB

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