1
0
forked from HPC/HPCplaybooks

Setup log rotation for docker.

This commit is contained in:
Egon Rijpkema 2018-10-23 11:09:45 +02:00
parent 8be6056f96
commit d68ec10d2c
2 changed files with 15 additions and 2 deletions

View File

@ -0,0 +1,7 @@
{
"log-driver": "json-file",
"log-opts": {
"max-size": "10m",
"max-file": "10"
}
}

View File

@ -19,6 +19,12 @@
- python-docker - python-docker
when: ansible_distribution == 'Ubuntu' and ansible_distribution_release == 'xenial' when: ansible_distribution == 'Ubuntu' and ansible_distribution_release == 'xenial'
- name: Setup log rotation.
copy:
src: files/daemon.json
dest: /etc/docker/daemon.json
tags: ['settings']
- name: make sure service is started - name: make sure service is started
systemd: systemd:
name: docker.service name: docker.service