feat: add icinga & ansible file generation

This commit is contained in:
2022-12-28 19:18:48 +01:00
parent d19448cf31
commit 9461a95639
3 changed files with 20 additions and 1 deletions

8
vm.py
View File

@@ -15,6 +15,7 @@ class VM:
self.network = args.get("network") or "default"
self.isExternal = args.get("external")
self.noTerminateACME = args.get("no-terminate-acme")
self.ansible = not args.get("noansible")
if self.isExternal:
self.lease = None
@@ -39,6 +40,13 @@ class VM:
raise ValueError("Hostname {} doesn't have a DHCP lease".format(self.hostname))
def __hash__(self):
return hash(self.hostname)
def __eq__(self, other):
return self.hostname == other.hostname
def dumpStreamComponents(self):
# port forwarding components #