From 32bada629f7b2371c91177af834769c9435f3229 Mon Sep 17 00:00:00 2001 From: Matthew Fennell Date: Fri, 2 Jan 2026 13:24:33 +0000 Subject: Derive is_transport_server from transport count I have two different kinds of servers - transport servers (which connect to legacy networks and have s2s disabled) and non-transport servers (which are XMPP-only and have s2s enabled). I previously had an is_transport_server boolean defined for each host in the inventory - however, this is duplicated information that can be derived from the length of the transports value (which lists the legacy networks to transport to). Transport servers have a non-empty transports list, while non-transport servers do not define the variable at all. So, handle this case in the playbook by deriving an empty list if the value is not present. --- playbook.yaml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'playbook.yaml') diff --git a/playbook.yaml b/playbook.yaml index 0c1fb48..c0fc761 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -547,3 +547,5 @@ # If virtual_host is "continuous.nonprod.example.org", then ds_subname is # "continuous.nonprod". ds_subname: "{{ virtual_host | regex_replace('.' + domain_with_ds, '') }}" + + is_transport_server: "{{ transports | default([]) | length > 0 }}" -- cgit v1.2.3