From a61ef4b841e312ed070a4723ec72468330e116a3 Mon Sep 17 00:00:00 2001 From: shockrah Date: Mon, 13 Jun 2022 23:16:30 -0700 Subject: [PATCH] + Docker config to save on space --- playbooks/alpha/docker-config.yml | 15 +++++++++++++++ playbooks/alpha/docker/daemon.json | 7 +++++++ 2 files changed, 22 insertions(+) create mode 100644 playbooks/alpha/docker-config.yml create mode 100644 playbooks/alpha/docker/daemon.json diff --git a/playbooks/alpha/docker-config.yml b/playbooks/alpha/docker-config.yml new file mode 100644 index 0000000..bfcdf3c --- /dev/null +++ b/playbooks/alpha/docker-config.yml @@ -0,0 +1,15 @@ +# Here we basically install a config that limits all containers to having +# a maxium amount of logs on disk. We do this to save on storage space +--- +- hosts: alpha + become: yes + tasks: + - name: Copy over daemon.json config + copy: + src: docker/daemon.json + dest: /etc/daemon.json + + - name: Restart Docker service + systemd: + name: docker + state: restarted diff --git a/playbooks/alpha/docker/daemon.json b/playbooks/alpha/docker/daemon.json new file mode 100644 index 0000000..b191b06 --- /dev/null +++ b/playbooks/alpha/docker/daemon.json @@ -0,0 +1,7 @@ +{ + "log-driver" : "local", + "log-opts": { + "max-size": "10m", + "max-file": "3" + } +}