From 4ec8036c88f6d5f74d213c4012cbde04ef053df2 Mon Sep 17 00:00:00 2001 From: TheNetworkGuy Date: Thu, 21 Nov 2024 08:38:42 +0100 Subject: [PATCH] Implemented #81 --- modules/device.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/device.py b/modules/device.py index 5da8a16..218e20e 100644 --- a/modules/device.py +++ b/modules/device.py @@ -154,6 +154,9 @@ class PhysicalDevice(): e = (f"Host {self.name}: Key 'templates' not found in config " "context 'zabbix' for template lookup") raise TemplateError(e) + # Check if format is list or string. + if isinstance(self.config_context["zabbix"]["templates"], str): + return [self.config_context["zabbix"]["templates"]] return self.config_context["zabbix"]["templates"] def set_inventory(self, nbdevice):