diff --git a/states/zabbix/defaults.yaml b/states/zabbix/defaults.yaml index 2af204b..09180bc 100644 --- a/states/zabbix/defaults.yaml +++ b/states/zabbix/defaults.yaml @@ -36,7 +36,9 @@ zabbix: ForceActiveChecksOnStart: 1 PersistentBufferFile: /var/lib/zabbix/buffer.sqlite3 Hostname: localhost - Include: "/etc/zabbix/zabbix_agent2.d/*.conf" + Include: + - "/etc/zabbix/zabbix_agent2.d/*.conf" + - "/etc/zabbix/zabbix_agent2.d/plugins.d/*.conf" LogFile: /var/log/zabbix/zabbix_agent2.log LogFileSize: 0 LogType: file diff --git a/states/zabbix/templates/zabbix_agent2.conf.j2 b/states/zabbix/templates/zabbix_agent2.conf.j2 index 0c30637..9e9f46a 100644 --- a/states/zabbix/templates/zabbix_agent2.conf.j2 +++ b/states/zabbix/templates/zabbix_agent2.conf.j2 @@ -1,4 +1,10 @@ {%- from "zabbix/map.jinja" import zabbix with context -%} -{%- for key, value in zabbix.agent2.config.items() %} +{%- for key, value in zabbix.agent2.config.items() -%} +{%- if value is sequence and value is not mapping and value is not string -%} +{%- for v in value %} +{{ key }}={{ v }} +{%- endfor -%} +{%- else %} {{ key }}={{ value }} +{%- endif %} {%- endfor -%} \ No newline at end of file