Compare commits

...

2 Commits

Author SHA1 Message Date
370e17bd80 fix: move zfs & snapshot python to helper scripts 2024-10-10 21:23:55 +00:00
820a7b454a feat: check for alternative http codes 2024-10-10 21:23:20 +00:00
4 changed files with 20 additions and 2 deletions

View File

@@ -85,6 +85,18 @@ if __name__ == "__main__":
# shut down VM # # shut down VM #
print("Next:", vm.name()) print("Next:", vm.name())
vm_skip_list = ["harbor-registry", "backup", "irc-new", #"kube1",
"kube2", "mail", "monitoring", "paperless",
"prometheus", "signal", "steam-master", "zabbix",
"git", "kathi", "usermanagement", "vpn", "ths", "nextcloud-athq"]
if vm.name() in vm_skip_list:
continue
vm_white_list = ["kube1"]
if vm_white_list:
if not vm.name() in vm_white_list:
continue
# create lockfile # # create lockfile #
lockfile_path = os.path.join(BASE_DIR, LOCKFILE) lockfile_path = os.path.join(BASE_DIR, LOCKFILE)

View File

@@ -10,7 +10,8 @@ def createMasterHostConfig(vmList):
continue continue
checkDomains = filter(lambda x: not x.get("nocheck"), vmo.subdomains) checkDomains = filter(lambda x: not x.get("nocheck"), vmo.subdomains)
websites = [ (s["name"], s.get("url")) for s in checkDomains]
websites = [ (s["name"], s.get("url"), [ str(x) for x in s.get("check-expect") or [] ]) for s in checkDomains]
f.write(template.render(hostname=vmo.hostname, address=vmo.ip, websites=websites)) f.write(template.render(hostname=vmo.hostname, address=vmo.ip, websites=websites))
def createMasterServiceConfig(vmList): def createMasterServiceConfig(vmList):

View File

@@ -15,7 +15,7 @@ object Host "{{ hostname }}" {
# groups = ["icingaadmins"] # groups = ["icingaadmins"]
# } # }
{% for website_name, url in websites %} {% for website_name, url, check_expect in websites %}
vars.http_vhosts["{{ website_name }}"] = { vars.http_vhosts["{{ website_name }}"] = {
{% if url %} {% if url %}
http_uri = "{{ url }}" http_uri = "{{ url }}"
@@ -23,8 +23,13 @@ object Host "{{ hostname }}" {
http_uri = "/" http_uri = "/"
{% endif %} {% endif %}
http_address = "{{ website_name }}" http_address = "{{ website_name }}"
http_vhost = "{{ website_name }}"
http_sni = true
http_ssl = true http_ssl = true
http_onredirect = "follow" http_onredirect = "follow"
{% if check_expect %}
http_expect = "{{ ','.join(check_expect) }}"
{% endif %}
} }
{% endfor %} {% endfor %}