Basic setup for Ubuntu 20.04/Debian 11
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.

44 lines
742 B

---
- name: update apt
hosts: all
become: yes
tasks:
- name: disable root ssh login
ansible.builtin.command:
cmd: sed -i 's/^#PermitRootLogin prohibit-password.*/PermitRootLogin no/' /etc/ssh/sshd_config
- name: update repositories
ansible.builtin.apt:
cache_valid_time: 86400
update_cache: yes
- name: install anti malware
hosts: all
become: yes
roles:
- malware
- name: configure 100% swap space
hosts: all
become: yes
roles:
- swap
- name: install fail2ban
hosts: all
become: yes
roles:
- fail2ban
- name: lower mem consumption
hosts: all
become: yes
roles:
- lowmem
- name: weekly reboot
hosts: all
become: yes
roles:
- reboot