From 6296ab583d08d02922098a37f253a01a1d397640 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Sat, 16 Mar 2024 11:04:49 +0100 Subject: [PATCH] add node attribute for all hosts that don't use letsencrypt ssl certs --- nodes/attributes.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/nodes/attributes.py b/nodes/attributes.py index 8460bc9..85fa36d 100644 --- a/nodes/attributes.py +++ b/nodes/attributes.py @@ -22,3 +22,15 @@ def needs_apply(node): io.stderr(f'{red("!!!")} {bold(node.name)} {e!r}') return False + + +@node_attribute +def uses_bw_managed_ssl(node): + if not node.has_bundle('nginx'): + return False + + for vhost in node.metadata.get('nginx/vhosts', {}).values(): + if vhost['ssl'] not in (None, False, 'letsencrypt'): + return True + + return False