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