From 3fbd737eb631f2588fa09f7631f8136749307465 Mon Sep 17 00:00:00 2001 From: uumas Date: Fri, 8 Nov 2024 04:28:50 +0200 Subject: [PATCH] service: lint and add missing argspec elements specs --- roles/service/meta/argument_specs.yaml | 3 +++ roles/service/tasks/mounts.yaml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/roles/service/meta/argument_specs.yaml b/roles/service/meta/argument_specs.yaml index a0134cb..765281c 100644 --- a/roles/service/meta/argument_specs.yaml +++ b/roles/service/meta/argument_specs.yaml @@ -13,6 +13,7 @@ argument_specs: type: list required: false default: [] + elements: str service_container_http_port: description: - Port inside the container where http requests will be proxied to. @@ -29,6 +30,7 @@ argument_specs: type: list required: false default: [] + elements: str service_container_mounts: description: List of bind mounts or volumes to be mounted inside the service container(s). type: list @@ -125,6 +127,7 @@ argument_specs: type: list required: false default: [] + elements: str env: description: A dict of environment variables for the container type: dict diff --git a/roles/service/tasks/mounts.yaml b/roles/service/tasks/mounts.yaml index 683c085..74652e5 100644 --- a/roles/service/tasks/mounts.yaml +++ b/roles/service/tasks/mounts.yaml @@ -6,7 +6,7 @@ - name: Set container named mounts ansible.builtin.set_fact: _service_container_mounts: > - {{ _service_container_mounts + + {{ _service_container_mounts + [mount | combine({'source': service_name + '-' + mount.source})] }} when: mount.type == 'volume' loop: "{{ service_container_mounts }}"