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,4 +1,4 @@
|
|||
% for custom_rule in sorted(node.metadata.get('postgresql', {}).get('custom_rules', [])):
|
||||
% for custom_rule in sorted(node.metadata.get('postgresql/custom_rules', [])):
|
||||
${custom_rule}
|
||||
% endfor
|
||||
local all postgres peer
|
||||
|
|
|
@ -63,7 +63,7 @@ if node.has_bundle('backup-client'): # and not node.has_bundle('zfs'):
|
|||
'source': 'backup-pre-hook',
|
||||
'content_type': 'mako',
|
||||
'context': {
|
||||
'databases': node.metadata.get('postgresql', {}).get('databases', {}).keys(),
|
||||
'databases': node.metadata.get('postgresql/databases', {}).keys(),
|
||||
},
|
||||
'mode': '0700',
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ svc_systemd = {
|
|||
|
||||
postgres_dbs = {}
|
||||
|
||||
for user, config in node.metadata.get('postgresql', {}).get('roles', {}).items():
|
||||
for user, config in node.metadata.get('postgresql/roles', {}).items():
|
||||
postgres_roles[user] = {
|
||||
'password': config['password'],
|
||||
'needs': {
|
||||
|
@ -97,7 +97,7 @@ for user, config in node.metadata.get('postgresql', {}).get('roles', {}).items()
|
|||
},
|
||||
}
|
||||
|
||||
for database, config in node.metadata.get('postgresql', {}).get('databases', {}).items():
|
||||
for database, config in node.metadata.get('postgresql/databases', {}).items():
|
||||
postgres_dbs[database] = {
|
||||
'owner': config['owner'],
|
||||
'needs': {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue