diff --git a/common.yml b/common.yml index 9332c58..6fb13a5 100644 --- a/common.yml +++ b/common.yml @@ -151,13 +151,22 @@ group: root mode: '0644' -# Set vm.swappiness to 5 in /etc/sysctl.conf - - sysctl: + # Set vm.swappiness to 5 in /etc/sysctl.conf + - name: "Set swappiness to zero in sysctl.conf" + sysctl: name: vm.swappiness value: '0' state: present + reload: yes sysctl_file: /etc/sysctl.conf + - name: Disable IPv6 with sysctl + sysctl: name={{ item }} value=1 state=present reload=yes + with_items: + - net.ipv6.conf.all.disable_ipv6 + - net.ipv6.conf.default.disable_ipv6 + - net.ipv6.conf.lo.disable_ipv6 + - name: "ssh_hardening" hosts: localhost