From 40194e595cda5a4baf71ac4309cb696a5cef1902 Mon Sep 17 00:00:00 2001 From: Igor Ribeiro Barbosa Duarte Date: Wed, 19 Jun 2024 14:34:11 -0300 Subject: [PATCH] ansible-scylla-monitoring: Allow adding a custom dockerd configuration Fixes https://github.com/scylladb/scylla-ansible-roles/issues/382 --- ansible-scylla-monitoring/defaults/main.yml | 4 ++++ ansible-scylla-monitoring/tasks/docker.yml | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/ansible-scylla-monitoring/defaults/main.yml b/ansible-scylla-monitoring/defaults/main.yml index f77678cc..0dca6e84 100644 --- a/ansible-scylla-monitoring/defaults/main.yml +++ b/ansible-scylla-monitoring/defaults/main.yml @@ -89,3 +89,7 @@ prometheus_url: 'https://github.com/prometheus/prometheus/releases/download/v2.3 # Additional arguments to pass to the prometheus binary #prometheus_args: "--web.enable-admin-api --storage.tsdb.retention.size=50G" + +# Use this variable for setting any custom configuration allowed by dockerd (https://docs.docker.com/reference/cli/dockerd/#on-linux) +# The content of this variable will be coppied to /etc/docker/daemon.json +# docker_daemon_custom_config: { "bip": "172.17.0.1/24" } diff --git a/ansible-scylla-monitoring/tasks/docker.yml b/ansible-scylla-monitoring/tasks/docker.yml index 69004cef..e7938592 100644 --- a/ansible-scylla-monitoring/tasks/docker.yml +++ b/ansible-scylla-monitoring/tasks/docker.yml @@ -2,6 +2,13 @@ - name: Populate service facts service_facts: +- name: Add custom dockerd config + copy: + content: "{{ docker_daemon_custom_config }}" + dest: "/etc/docker/daemon.json" + become: true + when: docker_daemon_custom_config is defined + - name: restart the docker daemon again service: name: docker