container: support bind mounted db data directory and mysql config

This commit is contained in:
uumas
2023-04-21 07:44:23 +03:00
parent 20e38332e6
commit 079b008111
7 changed files with 79 additions and 21 deletions

View File

@@ -3,18 +3,7 @@
- name: Create directories and put files in them
when: create_mounts_directory
block:
- name: Set docker_mounts_dir
set_fact:
docker_mounts_dir: "{{ container_workdir }}/mounts"
- name: Create directory {{ docker_mounts_dir }}
file:
path: "{{ docker_mounts_dir }}"
state: directory
owner: "{{ user.uid | default(omit) }}"
group: "{{ user.group | default(omit) }}"
mode: 0700
- name: Define mounts directory owner
- name: Define mount directory owner
set_fact:
mount_owner: "{{ user.uid if docker_host_user else image_user | default('') }}"
mount_group: "{{ user.group if docker_host_user else '' }}"