bundles: use metastack syntax for metadata.get()
All checks were successful
bundlewrap/pipeline/head This commit looks good
All checks were successful
bundlewrap/pipeline/head This commit looks good
This commit is contained in:
parent
4be912ac31
commit
b06532241b
38 changed files with 58 additions and 58 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue