Sin descripción
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

security.yml 873B

123456789101112131415161718192021222324252627282930
  1. - name: Install security-related packages
  2. apt:
  3. name: "{{ packages }}"
  4. state: present
  5. vars:
  6. packages:
  7. - fail2ban
  8. - whois
  9. - lynis
  10. - rkhunter
  11. tags:
  12. - dependencies
  13. - name: Copy fail2ban configuration into place
  14. template: src=etc_fail2ban_jail.local.j2 dest=/etc/fail2ban/jail.local
  15. notify: restart fail2ban
  16. - name: Copy fail2ban dovecot configuration into place
  17. copy: src=etc_fail2ban_filter.d_dovecot-pop3imap.conf dest=/etc/fail2ban/filter.d/dovecot-pop3imap.conf
  18. notify: restart fail2ban
  19. - name: Ensure fail2ban is started
  20. service: name=fail2ban state=started
  21. - name: Update sshd config for PFS and more secure defaults
  22. template: src=etc_ssh_sshd_config.j2 dest=/etc/ssh/sshd_config
  23. notify: restart ssh
  24. - name: Update ssh config for more secure defaults
  25. template: src=etc_ssh_ssh_config.j2 dest=/etc/ssh/ssh_config