From 1f3e2a9f59e83dc3f0fcbecf096a7e7b40d36ed7 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Wed, 28 Feb 2018 23:46:55 +0100 Subject: First running prototype --- roles/docker/tasks/main.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'roles/docker/tasks') diff --git a/roles/docker/tasks/main.yml b/roles/docker/tasks/main.yml index e424e01..a7bd700 100644 --- a/roles/docker/tasks/main.yml +++ b/roles/docker/tasks/main.yml @@ -27,6 +27,15 @@ lvol: vg="{{ ansible_lvm['lvs'][docker_lv]['vg'] }}" lv="docker_lv" size="{{ docker_volume_size }}" when: docker_volume_size is defined -- name: stop docker +- name: Limit size of container log files + ghetto_json: + path: "/etc/docker/daemon.json" + log-driver: "json-file" + log-opts.max-size: "{{ docker_max_log_size }}" + log-opts.max-file: "{{ docker_max_log_files }}" + notify: + - restart docker + +- name: start docker service: name="docker" enabled=yes state=started \ No newline at end of file -- cgit v1.2.3