have the docker role conf. the Docker daemon to log to systemd journal
All checks were successful
/ Ansible Lint (push) Successful in 1m39s
All checks were successful
/ Ansible Lint (push) Successful in 1m39s
This commit is contained in:
parent
e3a1443df9
commit
64343ae9ec
3 changed files with 18 additions and 0 deletions
3
roles/docker/files/daemon.json
Normal file
3
roles/docker/files/daemon.json
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"log-driver": "journald"
|
||||||
|
}
|
|
@ -5,3 +5,7 @@
|
||||||
- name: make sure Docker Engine and other related packages are installed
|
- name: make sure Docker Engine and other related packages are installed
|
||||||
ansible.builtin.import_tasks:
|
ansible.builtin.import_tasks:
|
||||||
file: main/02_docker_install.yaml
|
file: main/02_docker_install.yaml
|
||||||
|
|
||||||
|
- name: configure the Docker daemon
|
||||||
|
ansible.builtin.import_tasks:
|
||||||
|
file: main/03_docker_config.yaml
|
||||||
|
|
11
roles/docker/tasks/main/03_docker_config.yaml
Normal file
11
roles/docker/tasks/main/03_docker_config.yaml
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue