From 5991385defd10a90195a6779f9e6ccbf6041a8ee Mon Sep 17 00:00:00 2001 From: uumas Date: Tue, 7 Feb 2023 18:00:06 +0200 Subject: [PATCH] container: fix legacy docker_volumes compatibility, add missing arguments to argument specs --- roles/container/meta/argument_specs.yml | 27 +++++++++++++++++-------- roles/container/tasks/init.yml | 18 ++++++++++++----- roles/container/tasks/main.yml | 5 +++++ roles/container/tasks/volumes.yml | 16 +++++++-------- roles/container/vars/main.yml | 3 ++- 5 files changed, 47 insertions(+), 22 deletions(-) diff --git a/roles/container/meta/argument_specs.yml b/roles/container/meta/argument_specs.yml index 954fd46..6d4faa7 100644 --- a/roles/container/meta/argument_specs.yml +++ b/roles/container/meta/argument_specs.yml @@ -30,7 +30,7 @@ argument_specs: choices: - postgres - mariadb - - mongodb + - mongo - none default: none databse_passwords: @@ -47,7 +47,7 @@ argument_specs: default: [] docker_volume_type: - description: "Defines whether to use named volumes or bind mounts for volume definitions with name" + description: "Defines whether to use named volumes or bind mounts for mounts with name" type: str required: false choices: @@ -55,7 +55,13 @@ argument_specs: - bind default: named docker_volumes: - description: "List of docker volumes to be mounted inside the container. Each element is a dict with path and exactly one of name, src, template or rclone." + description: "DEPRECATED List of docker volumes to mount inside the container. Use docker_mounts instead. DEPRECATED" + type: list + required: false + default: [] + elements: str + docker_mounts: + description: "List of bind mounts or volumes to be mounted inside the container. Each element is a dict with path and exactly one of name, src or template" type: list required: false default: [] @@ -77,10 +83,6 @@ argument_specs: description: "Name of template without .j2 extension. Will be templated at /opt/[/suffix]/mounts/