diff --git a/roles/network/tasks/main.yaml b/roles/network/tasks/main.yaml index 753cfcc..de7ff93 100644 --- a/roles/network/tasks/main.yaml +++ b/roles/network/tasks/main.yaml @@ -10,7 +10,7 @@ opt: parent: "{{ ansible_facts.default_ipv4.interface if network_driver == 'macvlan' else omit }}" quadlet_options: - - | + - |- [Service] ExecStopPost=/usr/bin/podman network rm {{ network_name }} notify: diff --git a/roles/service/vars/main/general.yaml b/roles/service/vars/main/general.yaml index ce46881..56785e7 100644 --- a/roles/service/vars/main/general.yaml +++ b/roles/service/vars/main/general.yaml @@ -13,7 +13,12 @@ _service_container_networks: >- ) + ( service_container_additional_networks - + (_service_container_publish_socket_ports | map(attribute='name') | map('regex_replace', '^', service_name ~ '-')) + + ( + _service_container_publish_socket_ports + | map(attribute='name') + | map('regex_replace', '^', service_name ~ '-') + | map('regex_replace', '$', '-socat') + ) ) | map('community.general.dict_kv', 'name') }} _service_static_ip: "{{ service_container_ip | length > 0 }}" @@ -29,7 +34,7 @@ _service_container_wants: >- {{ service_wants + ([service_name + '-socat.socket'] if service_container_http_port > 0 else []) - + ([service_name + '-oauth2-proxy-socat.socket'] if _service_oauth2_proxy else []) + + ([service_name + '-oauth2-proxy.socket'] if _service_oauth2_proxy else []) + _service_container_publish_socket_ports | map(attribute='name') | map('regex_replace', '^', service_name ~ '-')