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 248 forks source link

update an existing host's info failed #311

Closed erikschwalbe closed 4 years ago

erikschwalbe commented 4 years ago

Describe the bug

TASK [dj-wasabi.zabbix-agent : Create a new host or update an existing host's info] ***** An exception occurred during task execution. To see the full traceback, use -vvv. The error was: KeyError: 'inventory_mode' fatal: [davmail -> localhost]: FAILED! => {"attempts": 3, "changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/home/ansible/.ansible/tmp/ansible-tmp-1581502642.834536-87986041710998/AnsiballZ_zabbix_host.py\", line 102, in \n _ansiballz_main()\n File \"/home/ansible/.ansible/tmp/ansible-tmp-1581502642.834536-87986041710998/AnsiballZ_zabbix_host.py\", line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/home/ansible/.ansible/tmp/ansible-tmp-1581502642.834536-87986041710998/AnsiballZ_zabbix_host.py\", line 40, in invoke_module\n runpy.run_module(mod_name='ansible.modules.monitoring.zabbix.zabbix_host', init_globals=None, run_name='main', alter_sys=True)\n File \"/usr/lib/python3.6/runpy.py\", line 205, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/lib/python3.6/runpy.py\", line 96, in _run_module_code\n mod_name, mod_spec, pkg_name, script_name)\n File \"/usr/lib/python3.6/runpy.py\", line 85, in _run_code\n exec(code, run_globals)\n File \"/tmp/ansible_zabbix_host_payload_7q_onh6x/ansible_zabbix_host_payload.zip/ansible/modules/monitoring/zabbix/zabbix_host.py\", line 925, in \n File \"/tmp/ansible_zabbix_host_payload_7q_onh6x/ansible_zabbix_host_payload.zip/ansible/modules/monitoring/zabbix/zabbix_host.py\", line 885, in main\n File \"/tmp/ansible_zabbix_host_payload_7q_onh6x/ansible_zabbix_host_payload.zip/ansible/modules/monitoring/zabbix/zabbix_host.py\", line 569, in check_all_properties\nKeyError: 'inventory_mode'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

Installation method/version

Ansible Version

ansible 2.9.4

Targetted hosts Concerns the following OS(es):

Expected behavior

Update an existing host on Zabbix server.

Additional context

Creating a new host on zabbix server still works. KeyError: 'inventory_mode' looks like the same problem like here: https://github.com/ansible/ansible/issues/65304

tobiasehlert commented 4 years ago

Issue https://github.com/dj-wasabi/ansible-zabbix-agent/issues/308 already exists on this error =]

dj-wasabi commented 4 years ago

Will close this issue as 1 is already created for similar issue.