- name: apply kernel attributes hosts: apache-intranet become: true tasks: - name: disable ipv6 ansible.posix.sysctl: name: "{{ item }}" value: "1" state: present reload: true loop: - net.ipv6.conf.all.disable_ipv6 - net.ipv6.conf.default.disable_ipv6