Skip to content

Instantly share code, notes, and snippets.

View scicco's full-sized avatar

scicco

View GitHub Profile
@scicco
scicco / disable-ipv6.yml
Last active April 3, 2017 15:01 — forked from tekei/disable-ipv6.yml
ansible : (ubuntu) disable IPv6
---
- name: Remove ipv6 hosts entry
replace:
dest: /etc/hosts
regexp: '^.*::\d\t.+|.*IPv6.*$'
#backup: yes
become: yes
# TODO FIND A WAY TO ELIMINATE EMPTY ROWS INSIDE /etc/hosts file
- name: Find ipv6 kernel parameter
shell: sysctl --all | egrep '^net.ipv6\..*disable' | awk '{print $1}'