From 3303199ba6ffed68f3c36f4e2f3fe8222009a495 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Thu, 25 Feb 2021 09:16:16 +1100 Subject: [PATCH] install-docker: move rsyslog handler earlier This syslog configuration is what sends any logs with a program-name of "docker-" to /var/log/containers/foo.log. However, at 98- level the rules are after the default 50- rules, so we're seeing the logs copied to both syslog and /var/log/containers. Since this contains a "stop" command, we should move this earlier before the default rules and the docker logs will not be duplicated. Change-Id: I0cbcd4694a4796573fe48383756be03597d2da0f --- .../files/{98-docker.conf => 10-docker.conf} | 0 playbooks/roles/install-docker/tasks/main.yaml | 7 ++++++- 2 files changed, 6 insertions(+), 1 deletion(-) rename playbooks/roles/install-docker/files/{98-docker.conf => 10-docker.conf} (100%) diff --git a/playbooks/roles/install-docker/files/98-docker.conf b/playbooks/roles/install-docker/files/10-docker.conf similarity index 100% rename from playbooks/roles/install-docker/files/98-docker.conf rename to playbooks/roles/install-docker/files/10-docker.conf diff --git a/playbooks/roles/install-docker/tasks/main.yaml b/playbooks/roles/install-docker/tasks/main.yaml index bab14e7740..ae265a5010 100644 --- a/playbooks/roles/install-docker/tasks/main.yaml +++ b/playbooks/roles/install-docker/tasks/main.yaml @@ -41,9 +41,14 @@ state: present executable: pip3 +- name: Remove incorrect rsyslog redirector + file: + state: absent + path: /etc/rsyslog.d/98-docker.conf + - name: Install rsyslog redirector for container tags copy: - src: '98-docker.conf' + src: '10-docker.conf' dest: /etc/rsyslog.d/ owner: root group: root