Change Docker data-root
This commit is contained in:
parent
5a637039de
commit
f685830436
4
roles/docker/defaults/main.yml
Normal file
4
roles/docker/defaults/main.yml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# vim: ft=yaml.ansible
|
||||||
|
# code: language=ansible
|
||||||
|
---
|
||||||
|
docker_data_root: "{{ data_fs }}/docker"
|
|
@ -21,9 +21,16 @@
|
||||||
- containerd.io
|
- containerd.io
|
||||||
state: present
|
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
|
- name: Copy Docker daemon config file
|
||||||
ansible.builtin.copy:
|
ansible.builtin.template:
|
||||||
src: daemon.json
|
src: daemon.json.j2
|
||||||
dest: /etc/docker/daemon.json
|
dest: /etc/docker/daemon.json
|
||||||
owner: root
|
owner: root
|
||||||
mode: u=rw,g=r,o=r
|
mode: u=rw,g=r,o=r
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
|
{# code: language=ansible-jinja #}
|
||||||
{
|
{
|
||||||
|
"data-root": "{{ docker_data_root }}",
|
||||||
"default-address-pools": [
|
"default-address-pools": [
|
||||||
{
|
{
|
||||||
"base": "172.17.0.0/16",
|
"base": "172.17.0.0/16",
|
|
@ -1,5 +1,5 @@
|
||||||
|
{# code: language=ansible-jinja #}
|
||||||
# THIS FILE IS MANAGED BY ANSIBLE
|
# THIS FILE IS MANAGED BY ANSIBLE
|
||||||
# code: language=ansible-jinja
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Environment=PGDATA={{ postgresql_pgdata }}
|
Environment=PGDATA={{ postgresql_pgdata }}
|
Loading…
Reference in a new issue