add node attribute for all hosts that don't use letsencrypt ssl certs

This commit is contained in:
Franzi 2024-03-16 11:04:49 +01:00
parent f5b87d995b
commit 6296ab583d
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

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