Setup log rotation for docker.
This commit is contained in:
parent
8be6056f96
commit
d68ec10d2c
7
roles/docker/files/daemon.json
Normal file
7
roles/docker/files/daemon.json
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"log-driver": "json-file",
|
||||||
|
"log-opts": {
|
||||||
|
"max-size": "10m",
|
||||||
|
"max-file": "10"
|
||||||
|
}
|
||||||
|
}
|
@ -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
|
Reference in New Issue
Block a user