mirror of
https://github.com/FAUSheppy/athq-vm-management
synced 2025-12-06 05:41:35 +01:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
1
main.py
1
main.py
@@ -11,6 +11,7 @@ location /.well-known/acme-challenge/ {
|
|||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
||||||
FILE = "vms.json"
|
FILE = "vms.json"
|
||||||
|
print(vm.HA_PROXY_STATIC_ACLS)
|
||||||
with open(FILE) as f:
|
with open(FILE) as f:
|
||||||
jsonList = json.load(f)
|
jsonList = json.load(f)
|
||||||
vmList = []
|
vmList = []
|
||||||
|
|||||||
5
vm.py
5
vm.py
@@ -1,6 +1,10 @@
|
|||||||
import libvirt
|
import libvirt
|
||||||
import jinja2
|
import jinja2
|
||||||
|
|
||||||
|
HA_PROXY_STATIC_ACLS = '''
|
||||||
|
acl is_acme path -i -m beg /.well-known/acme-challenge/
|
||||||
|
'''
|
||||||
|
|
||||||
class VM:
|
class VM:
|
||||||
|
|
||||||
environment = jinja2.Environment(loader=jinja2.FileSystemLoader(searchpath="./templates"))
|
environment = jinja2.Environment(loader=jinja2.FileSystemLoader(searchpath="./templates"))
|
||||||
@@ -10,6 +14,7 @@ class VM:
|
|||||||
self.hostname = args.get("hostname")
|
self.hostname = args.get("hostname")
|
||||||
self.subdomains = args.get("subdomains")
|
self.subdomains = args.get("subdomains")
|
||||||
self.ports = args.get("ports")
|
self.ports = args.get("ports")
|
||||||
|
self.terminateSSL = args.get("terminate-ssl")
|
||||||
self.network = args.get("network") or "default"
|
self.network = args.get("network") or "default"
|
||||||
self.lease = self._get_lease_for_hostname()
|
self.lease = self._get_lease_for_hostname()
|
||||||
self.ip = self.lease.get("ipaddr")
|
self.ip = self.lease.get("ipaddr")
|
||||||
|
|||||||
Reference in New Issue
Block a user