bundles: use metastack syntax for metadata.get()
All checks were successful
bundlewrap/pipeline/head This commit looks good

This commit is contained in:
Franzi 2021-02-18 18:12:25 +01:00
parent 4be912ac31
commit b06532241b
Signed by: kunsi
GPG key ID: 12E3D2136B818350
38 changed files with 58 additions and 58 deletions

View file

@ -1,6 +1,6 @@
#!/bin/bash
% if not node.metadata.get('iptables', {}).get('enabled', True):
% if not node.metadata.get('iptables/enabled', True):
exit 0
% endif

View file

@ -28,7 +28,7 @@ files = {
},
}
for bundle, rules in node.metadata.get('iptables', {}).get('bundle_rules', {}).items():
for bundle, rules in node.metadata.get('iptables/bundle_rules', {}).items():
files[f'/etc/iptables-rules.d/20-{bundle}'] = {
# We must never use sorted() here. Bundles might rely on their order.
'content': '\n'.join(rules) + '\n',