From 4f5c4158745c69d775486231b6fdd8721e0256c6 Mon Sep 17 00:00:00 2001 From: Sheppy Date: Wed, 28 Dec 2022 20:18:33 +0100 Subject: [PATCH] fix: use set of hosts for icinga config --- icinga.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/icinga.py b/icinga.py index deb176b..015ddef 100644 --- a/icinga.py +++ b/icinga.py @@ -4,7 +4,7 @@ environment = jinja2.Environment(loader=jinja2.FileSystemLoader(searchpath="./te def createMasterHostConfig(vmList): template = environment.get_template("icinga_host.conf.j2") with open("ansible/files/icinga_master_hosts.conf", "w") as f: - for vmo in vmList: + for vmo in set(vmList): if not vmo.check: continue