fix: skip virsh calls when only backup is requested

This commit is contained in:
2023-01-14 04:03:46 +01:00
parent 62f97ebd75
commit 317f7c397e
2 changed files with 6 additions and 3 deletions

4
vm.py
View File

@@ -5,7 +5,7 @@ class VM:
environment = jinja2.Environment(loader=jinja2.FileSystemLoader(searchpath="./templates"))
def __init__(self, args):
def __init__(self, args, skipVirsh):
self.hostname = args.get("hostname")
self.subdomains = args.get("subdomains")
@@ -18,7 +18,7 @@ class VM:
self.ansible = not args.get("noansible")
self.sshOutsidePort = None
if self.isExternal:
if self.isExternal or skipVirsh:
self.lease = None
self.ip = None
else: