Change Docker data-root

This commit is contained in:
Sam A. 2024-01-07 17:29:46 +01:00
parent 5a637039de
commit f685830436
Signed by: samsapti
GPG key ID: CBBBE7371E81C4EA
4 changed files with 16 additions and 3 deletions

View file

@ -0,0 +1,4 @@
# vim: ft=yaml.ansible
# code: language=ansible
---
docker_data_root: "{{ data_fs }}/docker"

View file

@ -21,9 +21,16 @@
- containerd.io
state: present
- name: Create Docker data root directory
ansible.builtin.file:
path: "{{ docker_data_root }}"
owner: root
mode: u=rwx,g=x,o=
state: directory
- name: Copy Docker daemon config file
ansible.builtin.copy:
src: daemon.json
ansible.builtin.template:
src: daemon.json.j2
dest: /etc/docker/daemon.json
owner: root
mode: u=rw,g=r,o=r

View file

@ -1,4 +1,6 @@
{# code: language=ansible-jinja #}
{
"data-root": "{{ docker_data_root }}",
"default-address-pools": [
{
"base": "172.17.0.0/16",

View file

@ -1,5 +1,5 @@
{# code: language=ansible-jinja #}
# THIS FILE IS MANAGED BY ANSIBLE
# code: language=ansible-jinja
[Service]
Environment=PGDATA={{ postgresql_pgdata }}