diff --git a/roles/prefer_ipv4/files/gai.conf b/roles/prefer_ipv4/files/gai.conf new file mode 100644 index 0000000000000000000000000000000000000000..aae620e37366dd47f7d382e51fc4b58bc05d4b16 --- /dev/null +++ b/roles/prefer_ipv4/files/gai.conf @@ -0,0 +1,12 @@ +#from https://community.rackspace.com/products/f/public-cloud-forum/5110/how-to-prefer-ipv4-over-ipv6-in-ubuntu-and-centos +label ::1/128 0 +label ::/0 1 +label 2002::/16 2 +label ::/96 3 +label ::ffff:0:0/96 4 +precedence ::1/128 50 +precedence ::/0 40 +precedence 2002::/16 30 +precedence ::/96 20 +precedence ::ffff:0:0/96 100 + diff --git a/roles/prefer_ipv4/tasks/main.yml b/roles/prefer_ipv4/tasks/main.yml new file mode 100644 index 0000000000000000000000000000000000000000..f75e8a004120e852c155c4a71b2f2edf79397150 --- /dev/null +++ b/roles/prefer_ipv4/tasks/main.yml @@ -0,0 +1,10 @@ +- name: Copy over gai.conf to /etc/ + become: true + become_user: root + copy: + src: gai.conf + dest: /etc/gai.conf + owner: root + group: root + mode: 0644 +