added disabling of ipv6

This commit is contained in:
panda 2021-10-03 01:41:50 +02:00
parent d1c990ee2f
commit fced43fa95

View file

@ -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