Closed isuftin closed 3 years ago
Hi @isuftin
This is already the case. You can use it as a string, but also as a list. See the template:
{% if zabbix_agent_loadmodule is defined and zabbix_agent_loadmodule %}
{% if zabbix_agent_loadmodule is string %}
LoadModule={{ zabbix_agent_loadmodule }}
{% else %}
{% for module in zabbix_agent_loadmodule %}
LoadModule={{ module }}
{% endfor %}
{% endif %}
{% endif %}
With using it like the following would work as well:
zabbix_agent_loadmodule:
- module1
- module2
- module3
As this is already the case, I will close this issue.
SUMMARY
The
LoadModule
parameter in zabbix_agentd.conf should allow multiple modules to be loaded. Curently, the config file only allows a single module to be defined.https://github.com/ansible-collections/community.zabbix/blob/1.4.0/roles/zabbix_agent/templates/zabbix_agentd.conf.j2#L265
The variable
zabbix_agent_loadmodule
should be changed to a list or if still a string, template should split a comma separated string to a list and write outLoadModule={{ zabbix_agent_loadmodule }}
in a loopISSUE TYPE
COMPONENT NAME
Zabbix Agent module
ADDITIONAL INFORMATION
This feature would conform the abilities of the Zabbix Agent module to be in-line with the intended configuration of the Zabbix agent.