1
0
Fork 0

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

@ -15,10 +15,16 @@
- name: install docker
apt: pkg={{ item }} state=latest
with_items:
- docker-engine
- python-docker
- docker-engine
- python-docker
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
systemd:
name: docker.service