have the docker role conf. the Docker daemon to log to systemd journal

This commit is contained in:
June 2025-01-14 23:19:38 +01:00
parent e3a1443df9
commit 64343ae9ec
Signed by: june
SSH key fingerprint: SHA256:o9EAq4Y9N9K0pBQeBTqhSDrND5E7oB+60ZNx0U1yPe0
3 changed files with 18 additions and 0 deletions

View file

@ -0,0 +1,3 @@
{
"log-driver": "journald"
}

View file

@ -5,3 +5,7 @@
- name: make sure Docker Engine and other related packages are installed
ansible.builtin.import_tasks:
file: main/02_docker_install.yaml
- name: configure the Docker daemon
ansible.builtin.import_tasks:
file: main/03_docker_config.yaml

View file

@ -0,0 +1,11 @@
# Configure the Docker daemon with the following settings:
# - log to systemd journal
# https://docs.docker.com/engine/logging/drivers/journald/
- name: configure Docker daemon
ansible.builtin.copy:
src: daemon.json
dest: /etc/docker/daemon.json
owner: root
group: root
mode: "0644"
become: true