Collect docker logs as root

When testing our system-conf configuration we don't actually add zuul to
the docker group. This means the zuul user cannot access the docker
socket. This then breaks docker container log collection. Address this
by becoming root when collecting logs.

Change-Id: Ic0232f7ef458cdd07fb0853f97f2dc22ce137c71
changes/85/710885/2
Clark Boylan 3 years ago committed by Ian Wienand
parent 312cadf53f
commit 6f9c151e79

@ -18,6 +18,14 @@
tasks:
- include_role:
name: collect-container-logs
# The zuul user isn't part of the docker group on our fake
# production systems. Work around this by operating as root
# when collecting logs. This collects podman containers
# running as root; we may need to think about some flags for
# this role for collecting logs from containers under other
# users.
apply:
become: yes
vars:
container_command: "{{ item }}"
loop:

Loading…
Cancel
Save