dj-wasabi / ansible-zabbix-agent

Installing and maintaining zabbix-agent for RedHat/Debian/Ubuntu/Windows/Suse.
https://galaxy.ansible.com/dj-wasabi/zabbix-agent
MIT License
327 stars 249 forks source link

adding empty dict to zabbix_agent_inventory_zabbix #323

Closed tobiasehlert closed 4 years ago

tobiasehlert commented 4 years ago

Description of PR

Setting default of zabbix_agent_inventory_zabbix to dict in defaults/main.yml

zabbix_agent_inventory_zabbix: {}

Switching from default(omit) to default({}) in tasks.main.yml

inventory_zabbix: "{{ zabbix_agent_inventory_zabbix | default({}) }}"

Type of change

Bugfix Pull Request

Fixes an issue

https://github.com/dj-wasabi/ansible-zabbix-agent/issues/317

When running ansible-playbook with role, following error is returned:

argument inventory_zabbix is of type <class 'str'> and we were unable to convert to dict: dictionary requested, could not parse JSON or key=value

dj-wasabi commented 4 years ago

Thanks! 👍