feat: generate icinga2 service conf for async

This commit is contained in:
2023-01-05 20:43:49 +01:00
parent 12992050f3
commit fe66cb713f
2 changed files with 39 additions and 0 deletions

View File

@@ -82,3 +82,9 @@ def createBackupScriptStructure(backupList, baseDomain=""):
ansibleFilename = "./ansible/files/async-icinga-config-dynamic.json"
with open(ansibleFilename, "w") as f:
f.write(json.dumps(asyncIcingaConf))
# write async icinga services in ansible #
ansibleFilename = "./ansible/files/async-icinga-services-dynamic.conf"
icingaServiceTemplate = environment.get_template("async-icinga-services-dynamic.conf.j2")
with open(ansibleFilename, "w") as f:
f.write(icingaServiceTemplate.render(asyncIcingaConf=asyncIcingaConf))