bundlewrap/bundles/hostname/metadata.py
mwiegand 46941f532e wip
2021-07-14 12:41:22 +02:00

19 lines
367 B
Python

hostname = '.'.join([*reversed(node.name.split('.')), 'ckn', 'li'])
defaults = {
'hostname': hostname,
'hosts': {
'127.0.0.1': [hostname],
},
}
@metadata_reactor.provides(
'dns',
)
def dns(metadata):
return {
'dns': {
metadata.get('hostname'): repo.libs.dns.get_a_records(metadata, external=False),
},
}