bundles/iptables: add newline to rules files
This commit is contained in:
parent
877744b0ba
commit
32b7dda61f
1 changed files with 2 additions and 2 deletions
|
@ -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', {}).get('bundle_rules', {}).items():
|
||||||
files[f'/etc/iptables-rules.d/20-{bundle}'] = {
|
files[f'/etc/iptables-rules.d/20-{bundle}'] = {
|
||||||
# We must never use sorted() here. Bundles might rely on their order.
|
# We must never use sorted() here. Bundles might rely on their order.
|
||||||
'content': '\n'.join(rules),
|
'content': '\n'.join(rules) + '\n',
|
||||||
'triggers': {
|
'triggers': {
|
||||||
'action:iptables_enforce',
|
'action:iptables_enforce',
|
||||||
},
|
},
|
||||||
|
@ -36,7 +36,7 @@ for bundle, rules in node.metadata.get('iptables', {}).get('bundle_rules', {}).i
|
||||||
|
|
||||||
if 'custom_rules' in node.metadata.get('iptables', {}):
|
if 'custom_rules' in node.metadata.get('iptables', {}):
|
||||||
files[f'/etc/iptables-rules.d/40-custom'] = {
|
files[f'/etc/iptables-rules.d/40-custom'] = {
|
||||||
'content': '\n'.join(node.metadata['iptables']['custom_rules']),
|
'content': '\n'.join(node.metadata['iptables']['custom_rules']) + '\n',
|
||||||
'triggers': {
|
'triggers': {
|
||||||
'action:iptables_enforce',
|
'action:iptables_enforce',
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue