container: rework bind mount directory permissions, move from volume syntax to mount syntax, add single file template volumes

This commit is contained in:
uumas
2023-02-03 05:15:39 +02:00
parent 3c670d5832
commit f45f7d25e0
3 changed files with 36 additions and 23 deletions

View File

@@ -57,8 +57,7 @@
name: "{{ docker_service_name }}"
image: "{{ container_image.image.Id }}"
user: "{{ docker_user | default(omit) }}"
pull: "{{ dockerfile is not defined }}"
volumes: "{{ docker_volume_definition }}"
mounts: "{{ docker_volume_definition }}"
published_ports: "{{ container_published_ports + docker_published_ports }}"
labels: "{{ traefik_labels | default(omit) }}"
env: "{{ docker_env | combine(docker_additional_env) }}"
@@ -68,11 +67,3 @@
networks: "{{ container_networks | default(omit) }}"
log_driver: local
register: container_out
- name: "Reset bind mount directory permissions"
file:
path: "{{ docker_mounts_dir }}/{{ item.name }}"
state: directory
mode: 0750
when: "docker_volume_type == 'bind' and item.name is defined"
loop: "{{ final_docker_volumes }}"