diff --git a/main.py b/main.py index 73c82fb..8f65b34 100644 --- a/main.py +++ b/main.py @@ -11,6 +11,7 @@ location /.well-known/acme-challenge/ { if __name__ == "__main__": FILE = "vms.json" + print(vm.HA_PROXY_STATIC_ACLS) with open(FILE) as f: jsonList = json.load(f) vmList = [] diff --git a/vm.py b/vm.py index 9ec7a6b..5711b27 100644 --- a/vm.py +++ b/vm.py @@ -1,6 +1,10 @@ import libvirt import jinja2 +HA_PROXY_STATIC_ACLS = ''' +acl is_acme path -i -m beg /.well-known/acme-challenge/ +''' + class VM: environment = jinja2.Environment(loader=jinja2.FileSystemLoader(searchpath="./templates")) @@ -10,6 +14,7 @@ class VM: self.hostname = args.get("hostname") self.subdomains = args.get("subdomains") self.ports = args.get("ports") + self.terminateSSL = args.get("terminate-ssl") self.network = args.get("network") or "default" self.lease = self._get_lease_for_hostname() self.ip = self.lease.get("ipaddr")