diff --git a/roles/service/defaults/main.yaml b/roles/service/defaults/main.yaml index f89006d..1db0334 100644 --- a/roles/service/defaults/main.yaml +++ b/roles/service/defaults/main.yaml @@ -1,6 +1,8 @@ --- service_domains: [] +service_vhost_locations: [] +service_container_additional_networks: [] service_container_user: "" service_container_publish_ports: [] service_container_mounts: [] diff --git a/roles/service/meta/argument_specs.yaml b/roles/service/meta/argument_specs.yaml index fb7323b..f881249 100644 --- a/roles/service/meta/argument_specs.yaml +++ b/roles/service/meta/argument_specs.yaml @@ -20,6 +20,10 @@ argument_specs: - Required if service_domains is not empty. type: int required: false + service_vhost_locations: + description: Passed to vhost role as vhost_locations + required: false + default: [] service_container_image: description: "The image to run in the service container(s), in FQIN format (registry/imagename:tag)." @@ -30,6 +34,12 @@ argument_specs: type: str required: false default: "" + service_container_additional_networks: + description: A list of additional podman networks for the service container (in addition to service name network). + type: list + required: false + default: [] + elements: str service_container_publish_ports: description: "A list of published ports in docker format (::)" type: list diff --git a/roles/service/tasks/main.yaml b/roles/service/tasks/main.yaml index 9766abb..bffb4c4 100644 --- a/roles/service/tasks/main.yaml +++ b/roles/service/tasks/main.yaml @@ -28,8 +28,7 @@ container_user: "{{ service_container_user }}" container_mounts: "{{ _service_container_mounts }}" container_publish_ports: "{{ service_container_publish_ports }}" - container_networks: - - "{{ service_name }}" + container_networks: "{{ [service_name] + service_container_additional_networks }}" container_secrets: "{{ _service_container_secrets }}" container_env: "{{ service_container_env }}" container_requires: "{{ _service_container_requires }}" diff --git a/roles/service/tasks/proxy.yaml b/roles/service/tasks/proxy.yaml index 900db3e..fa00610 100644 --- a/roles/service/tasks/proxy.yaml +++ b/roles/service/tasks/proxy.yaml @@ -33,3 +33,4 @@ vhost_domains: "{{ service_domains }}" vhost_proxy_target_netproto: unix vhost_proxy_target_socket: "/run/{{ service_name }}-socat.sock" + vhost_locations: "{{ service_vhost_locations }}"