service: Support specifying additional vhost locations and container

networks
This commit is contained in:
uumas
2025-03-22 01:44:40 +02:00
parent e3007ff405
commit f1eb28b431
4 changed files with 14 additions and 2 deletions

View File

@@ -1,6 +1,8 @@
---
service_domains: []
service_vhost_locations: []
service_container_additional_networks: []
service_container_user: ""
service_container_publish_ports: []
service_container_mounts: []

View File

@@ -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 (<host listen address>:<host port>:<container port>)"
type: list

View File

@@ -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 }}"

View File

@@ -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 }}"