Browse Source

Include zone name in the header

pull/245/head
Ross McFarland 8 years ago
parent
commit
50e1ce3881
No known key found for this signature in database GPG Key ID: 61C10C4FC8FE4A89
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      octodns/provider/etc_hosts.py

+ 4
- 2
octodns/provider/etc_hosts.py View File

@ -69,11 +69,13 @@ class EtcHostsProvider(BaseProvider):
filename = '{}hosts'.format(join(self.directory, desired.name)) filename = '{}hosts'.format(join(self.directory, desired.name))
self.log.info('_apply: filename=%s', filename) self.log.info('_apply: filename=%s', filename)
with open(filename, 'w') as fh: with open(filename, 'w') as fh:
fh.write('########################################\n')
fh.write('##################################################\n')
fh.write('# octoDNS ') fh.write('# octoDNS ')
fh.write(self.id) fh.write(self.id)
fh.write(' ')
fh.write(desired.name)
fh.write('\n') fh.write('\n')
fh.write('########################################\n\n')
fh.write('##################################################\n\n')
if values: if values:
fh.write('## A & AAAA\n\n') fh.write('## A & AAAA\n\n')
for fqdn, value in sorted(values.items()): for fqdn, value in sorted(values.items()):


Loading…
Cancel
Save