Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set macro value twice will be error(MySQL by zabbix agent 2) #435

Closed
silverlight-jjm opened this issue Aug 1, 2021 · 3 comments
Closed
Labels
bug Something isn't working role The issue or pull request is related to Zabbix role

Comments

@silverlight-jjm
Copy link

SUMMARY

create or modigy Mysql by zabbix agent 2 template mcro values by zabbix_host twice will be error.

ISSUE TYPE
  • Bug Report
    zabbix_macros:
    • macro_key: "MYSQL.DSN"
      macro_value: "localhost"
    • macro_key: "MYSQL.USER"
      macro_value: "zabbix_server"
    • macro_key: "MYSQL.PASSWORD"
      macro_value: "zabbix_server"

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: KeyError: 'inventory_mode'
fatal: [node02 -> localhost]: FAILED! => {"attempts": 3, "changed": false, "module_stderr": "Traceback (most recent call last):\n File "/home/ansible/.ansible/tmp/ansible-tmp-1627814858.5100849-46894-132828156123395/AnsiballZ_zabbix_host.py", line 100, in \n _ansiballz_main()\n File "/home/ansible/.ansible/tmp/ansible-tmp-1627814858.5100849-46894-132828156123395/AnsiballZ_zabbix_host.py", line 92, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File "/home/ansible/.ansible/tmp/ansible-tmp-1627814858.5100849-46894-132828156123395/AnsiballZ_zabbix_host.py", line 40, in invoke_module\n runpy.run_module(mod_name='ansible_collections.community.zabbix.plugins.modules.zabbix_host', init_globals=dict(_module_fqn='ansible_collections.community.zabbix.plugins.modules.zabbix_host', _modlib_path=modlib_path),\n File "/usr/lib/python3.8/runpy.py", line 207, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File "/usr/lib/python3.8/runpy.py", line 97, in _run_module_code\n _run_code(code, mod_globals, init_globals,\n File "/usr/lib/python3.8/runpy.py", line 87, in _run_code\n exec(code, run_globals)\n File "/tmp/ansible_zabbix_host_payload_4aqc6a3m/ansible_zabbix_host_payload.zip/ansible_collections/community/zabbix/plugins/modules/zabbix_host.py", line 1216, in \n File "/tmp/ansible_zabbix_host_payload_4aqc6a3m/ansible_zabbix_host_payload.zip/ansible_collections/community/zabbix/plugins/modules/zabbix_host.py", line 1162, in main\n File "/tmp/ansible_zabbix_host_payload_4aqc6a3m/ansible_zabbix_host_payload.zip/ansible_collections/community/zabbix/plugins/modules/zabbix_host.py", line 785, in check_all_properties\nKeyError: 'inventory_mode'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

COMPONENT NAME

zabbix_host

ANSIBLE VERSION
2.11.3 core
4.3 
CONFIGURATION

OS / ENVIRONMENT / Zabbix Version
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS

@D3DeFi D3DeFi added the role The issue or pull request is related to Zabbix role label Aug 8, 2021
@D3DeFi D3DeFi added the bug Something isn't working label Sep 29, 2021
@miettal
Copy link
Contributor

miettal commented Oct 5, 2021

@dj-wasabi
Copy link

Hi @silverlight-jjm

@miettal mentioned this could be related to some issues/PR's that are currently closed, assuming you won't have the issue anymore. Can you validate if issue is now resolved and let me know? Thanks! 👍

@dj-wasabi
Copy link

Will close this as the issue related to inventory_host is fixed. If you still have this issue, don't hesitate to reopen. If a new error arise, please provide this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working role The issue or pull request is related to Zabbix role
Projects
None yet
Development

No branches or pull requests

4 participants