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" + } +}