Catching up with current successes

This commit is contained in:
2022-01-25 23:54:43 -06:00
parent 94a4736839
commit 921d53c724
70 changed files with 2912 additions and 355 deletions

View File

@@ -25,7 +25,7 @@ def WriteDHCPEntry(content,hosttype,hostclass):
with open(dhcpfilepath,'a') as dhcpfile:
for host in content['all']['children'][hosttype]['children'][hostclass]['hosts']:
try:
dhcpfile.write('dhcp-host=' + content['all']['children'][hosttype]['children'][hostclass]['hosts'][host]['vars']['mac'] + ',' + content['all']['children'][hosttype]['children'][hostclass]['hosts'][host]['vars']['ip'] + '\n')
dhcpfile.write('dhcp-host=' + content['all']['children'][hosttype]['children'][hostclass]['hosts'][host]['vars']['mac'] + ',' + content['all']['children'][hosttype]['children'][hostclass]['hosts'][host]['vars']['ip'] + ',' + host + '.' + content['all']['vars']['replica_domain'] + '\n')
except:
print(host + ' is not complete for DHCP.')
@@ -63,11 +63,11 @@ def GenerateFiles(file):
# Add DNS entries for each host
hosttype = 'managed'
for hostclass in ['physical','virtual','geth-hubs']:
for hostclass in ['physical','virtual','geth_hubs']:
WriteDNSEntry(content,hosttype,hostclass)
WriteDHCPEntry(content,hosttype,hostclass)
hosttype = 'unmanaged'
for hostclass in ['ovas','hardware','iot']:
for hostclass in ['ovas','appliances','iot']:
WriteDNSEntry(content,hosttype,hostclass)
WriteDHCPEntry(content,hosttype,hostclass)