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
|
@ -24,7 +24,7 @@ $TTL 60
|
|||
)
|
||||
"""
|
||||
for rnode in sorted(repo.nodes_in_group('dns')):
|
||||
ZONE_HEADER += '@ IN NS {}.\n'.format(rnode.metadata.get('powerdns', {}).get('my_hostname', rnode.metadata['hostname']))
|
||||
ZONE_HEADER += '@ IN NS {}.\n'.format(rnode.metadata.get('powerdns/my_hostname', rnode.metadata['hostname']))
|
||||
|
||||
directories = {
|
||||
'/etc/powerdns/pdns.d': {
|
||||
|
@ -85,7 +85,7 @@ actions = {
|
|||
},
|
||||
}
|
||||
|
||||
if node.metadata['powerdns'].get('features', {}).get('bind', False):
|
||||
if node.metadata.get('powerdns/features/bind', False):
|
||||
primary_zones = set()
|
||||
for zone in listdir(zone_path):
|
||||
if not isfile(join(zone_path, zone)) or zone.startswith(".") or zone.startswith("_"):
|
||||
|
@ -103,7 +103,7 @@ if node.metadata['powerdns'].get('features', {}).get('bind', False):
|
|||
'content_type': 'mako',
|
||||
'context': {
|
||||
'header': ZONE_HEADER.format(serial=serial),
|
||||
'metadata_records': node.metadata.get('powerdns', {}).get('bind-zones', {}).get(zone, {}).get('records', []),
|
||||
'metadata_records': node.metadata.get('powerdns/bind-zones/{}/records'.format(zone), []),
|
||||
},
|
||||
'source': 'bind-zones/{}'.format(zone),
|
||||
'triggers': {
|
||||
|
@ -142,7 +142,7 @@ if node.metadata['powerdns'].get('features', {}).get('bind', False):
|
|||
},
|
||||
}
|
||||
|
||||
if node.metadata['powerdns'].get('features', {}).get('pgsql', False):
|
||||
if node.metadata.get('powerdns/features/pgsql', False):
|
||||
files['/etc/powerdns/pdns.d/pgsql.conf'] = {
|
||||
'content_type': 'mako',
|
||||
'context': {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue