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

@ -27,7 +27,7 @@ pkg_apt = {
'wget': {},
}
if node.metadata.get('apt', {}).get('packages', {}):
if node.metadata.get('apt/packages', {}):
for package, options in node.metadata['apt']['packages'].items():
pkg_apt[package] = options
@ -62,7 +62,7 @@ files = {
'content_type': 'mako',
'mode': '0700',
'context': {
'data': node.metadata.get('apt', {}).get('unattended-upgrades', {}),
'data': node.metadata.get('apt/unattended-upgrades', {}),
}
},
}
@ -76,7 +76,7 @@ for crontab, content in node.metadata.get('cron', {}).items():
}
}
for vhost, config in node.metadata.get('nginx', {}).get('vhosts', {}).items():
for vhost, config in node.metadata.get('nginx/vhosts', {}).items():
if not 'domain' in config:
config['domain'] = vhost