From 0507a88290a66586f4f7d5c449c8e714d44daf56 Mon Sep 17 00:00:00 2001 From: Michael Balsillie Date: Wed, 16 Sep 2026 02:19:52 -0400 Subject: [PATCH] ipv4_only wip --- roles/ipv4_only/tasks/main.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/roles/ipv4_only/tasks/main.yml b/roles/ipv4_only/tasks/main.yml index c351b32..e694c7e 100644 --- a/roles/ipv4_only/tasks/main.yml +++ b/roles/ipv4_only/tasks/main.yml @@ -1,5 +1,23 @@ # code: language=ansible +- name: Disable IPv6 Link Local Addressing + ansible.builtin.lineinfile: + path: /etc/systemd/network/10-cloud-init-eth0.network + line: "{{ item.line }}" + regexp: "{{ item.regexp }}" + insertafter: '^\[Network\]$' + firstmatch: true + state: present + loop: + - line: LinkLocalAddressing=no + regexp: '^LinkLocalAddressing\s*=\s*.*$' + - line: IPv6LinkLocalAddressGenerationMode=none + regexp: '^IPv6LinkLocalAddressGenerationMode\s*=\s*.*$' + loop_control: + label: "{{ item.line }}" + notify: + - Reboot + - name: Disable ipv6 (all) ansible.posix.sysctl: name: "{{ item }}"