bundlewrap/bundles/hostname/metadata.py
mwiegand d2c1c6ab0d wip
2021-08-13 01:19:31 +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),
},
}