bundle/dhcpd: improvements #19

Merged
sophie merged 6 commits from kunsi-dhcpd-improvements into main 2020-11-15 12:34:41 +00:00
2 changed files with 9 additions and 1 deletions
Showing only changes of commit 9df5cb1f16 - Show all commits

View file

@ -10,7 +10,10 @@ defaults = {
@metadata_reactor
def get_static_allocations(metadata):
allocations = {}
for rnode in repo.nodes_in_group('home'):
for rnode in repo.nodes:
if rnode.metadata.get('location', '') != metadata.get('location', ''):
continue
for identifier, interface in rnode.metadata.get('interfaces', {}).items():
if interface.get('dhcp', False):
allocations[rnode.name] = {

View file

@ -13,6 +13,7 @@ groups['gce'] = {
},
},
},
'location': 'gce',
'nameservers': {
'8.8.8.8',
'8.8.4.4',
@ -33,6 +34,9 @@ groups['htz'] = {
'subgroups': {
'htz-cloud',
},
'metadata': {
'location': 'htz',
},
}
groups['htz-cloud'] = {
@ -70,6 +74,7 @@ groups['ovh'] = {
r"ovh\..*",
},
'metadata': {
'location': 'ovh',
'users': {
'debian': {
'delete': True,