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 @@
|
|||
from os.path import join
|
||||
|
||||
if node.metadata['backups'].get('exclude_from_backups', False):
|
||||
if node.metadata.get('backups/exclude_from_backups', False):
|
||||
files['/etc/backup.priv'] = {
|
||||
'delete': True,
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ else:
|
|||
'username': node.metadata['backup-client']['user-name'],
|
||||
'server': server,
|
||||
'port': port,
|
||||
'paths': node.metadata.get('backups', {}).get('paths', {}),
|
||||
'paths': node.metadata.get('backups/paths', {}),
|
||||
},
|
||||
'mode': '0700',
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ directories['/etc/backup-pre-hooks.d'] = {
|
|||
'purge': True,
|
||||
}
|
||||
|
||||
for hname, hcontent in node.metadata['backup-client'].get('pre-hooks', {}).items():
|
||||
for hname, hcontent in node.metadata.get('backup-client/pre-hooks', {}).items():
|
||||
files[f'/etc/backup-pre-hooks.d/50-{hname}'] = {
|
||||
'content': '#!/bin/sh\n\n' + hcontent,
|
||||
'mode': '0700',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue