diff --git a/roles/docker/files/daemon.json b/roles/docker/files/daemon.json index 9faa846..c8165fa 100644 --- a/roles/docker/files/daemon.json +++ b/roles/docker/files/daemon.json @@ -1,4 +1,6 @@ { + "ipv6": true, + "fixed-cidr-v6": "fd00:d0ce:d0ce:d0ce::/64", "dns": [ "46.182.19.48", "74.82.42.42" diff --git a/roles/docker/tasks/config.yml b/roles/docker/tasks/config.yml index bc8fddc..a402aca 100644 --- a/roles/docker/tasks/config.yml +++ b/roles/docker/tasks/config.yml @@ -1,4 +1,7 @@ --- +- name: Add IPv6 NAT iptables rules + shell: ip6tables -t nat -A POSTROUTING -s fd00:d0ce:d0ce:d0ce::/64 -j MASQUERADE && ip6tables-save > /etc/iptables/rules.v6 + - name: add docker configuration copy: dest: /etc/docker/daemon.json diff --git a/roles/docker/tasks/packages.yml b/roles/docker/tasks/packages.yml index b6ffdb6..67956e4 100644 --- a/roles/docker/tasks/packages.yml +++ b/roles/docker/tasks/packages.yml @@ -19,3 +19,8 @@ name: "docker-ce" update_cache: yes state: present + +- name: install iptables-persistent + apt: + name: iptables-persistent + state: present