From b74513fb9df27a02f5c27ff390493335bd7bf209 Mon Sep 17 00:00:00 2001 From: Arya Kiran Date: Mon, 28 Jul 2025 19:12:47 +0530 Subject: [PATCH] ansiblize daemon.json --- all/playbook.yaml | 5 +++++ all/templates/eu/daemon.json | 18 ++++++++++++++++++ all/templates/in/daemon.json | 13 +++++++++++++ all/templates/us/daemon.json | 5 +++++ 4 files changed, 41 insertions(+) create mode 100644 all/templates/eu/daemon.json create mode 100644 all/templates/in/daemon.json create mode 100644 all/templates/us/daemon.json diff --git a/all/playbook.yaml b/all/playbook.yaml index 22f443a..c7112f3 100644 --- a/all/playbook.yaml +++ b/all/playbook.yaml @@ -208,6 +208,11 @@ dest: "/etc/borgmatic/config.yaml" state: "absent" regexp: "^.*encryption_passphrase" + - name: Copy per-server docker daemon.json + ansible.builtin.copy: + src: "./templates/{{ inventory_hostname }}/daemon.json" + dest: /etc/docker/daemon.json + mode: preserve handlers: - name: Restart sshd ansible.builtin.service: diff --git a/all/templates/eu/daemon.json b/all/templates/eu/daemon.json new file mode 100644 index 0000000..5a7bab1 --- /dev/null +++ b/all/templates/eu/daemon.json @@ -0,0 +1,18 @@ +{ + "experimental": true, + "ip6tables": true, + "ipv6": true, + "fixed-cidr-v6": "fd00::/64", + "log-driver": "local", + "default-address-pools": [ + { "base": "172.17.0.0/16", "size": 16 }, + { "base": "172.18.0.0/16", "size": 16 }, + { "base": "172.19.0.0/16", "size": 16 }, + { "base": "172.20.0.0/14", "size": 16 }, + { "base": "172.24.0.0/14", "size": 16 }, + { "base": "172.28.0.0/14", "size": 16 }, + { "base": "192.168.0.0/16", "size": 20 }, + { "base": "2001:db8::/104", "size": 112 } + ] + +} diff --git a/all/templates/in/daemon.json b/all/templates/in/daemon.json new file mode 100644 index 0000000..40641f5 --- /dev/null +++ b/all/templates/in/daemon.json @@ -0,0 +1,13 @@ +{ +"ipv6": true, +"log-driver": "local", +"fixed-cidr-v6": "2001:db8:1::/64", + "default-address-pools": [ + { + "base": "172.80.0.0/16", + "size": 24 + } + ], + "experimental": true, + "ip6tables": true +} diff --git a/all/templates/us/daemon.json b/all/templates/us/daemon.json new file mode 100644 index 0000000..e7343f4 --- /dev/null +++ b/all/templates/us/daemon.json @@ -0,0 +1,5 @@ +{ +"log-driver": "local", +"ipv6": true, +"fixed-cidr-v6": "fd00:dead:beef::/48" +}