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

Zabbix-agent - API calls. Host/Group vars are not loaded to the httpapi-connection plugin #1241

Open
kivilahtio opened this issue May 29, 2024 · 3 comments

Comments

@kivilahtio
Copy link

SUMMARY

When I define:

zabbix_api_server_host:
zabbix_api_server_port:
zabbix_api_login_user:
zabbix_api_use_ssl:
zabbix_api_login_pass:

In group vars or host vars they are not used in the roles/zabbix_agent/tasks/api.yml.
I have to explicitly set those variables in the role defaults -file

Other vars seem to work, such as

zabbix_agent_distribution_release:
ISSUE TYPE
  • Bug Report
COMPONENT NAME

Zabbix Agent

ANSIBLE VERSION
ansible [core 2.13.13]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/ansible/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.8/dist-packages/ansible
  ansible collection location = /home/ansible/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.8.10 (default, Nov 22 2023, 10:22:35) [GCC 9.4.0]
  jinja version = 3.1.4
  libyaml = True

CONFIGURATION
ANSIBLE_PIPELINING(/home/ansible/emb-toveri/Ansible/ansible.cfg) = True
COLLECTIONS_PATHS(/home/ansible/emb-toveri/Ansible/ansible.cfg) = ['/home/ansible/emb-toveri/Ansible']
DEFAULT_HOST_LIST(/home/ansible/emb-toveri/Ansible/ansible.cfg) = ['/home/ansible/ToveriConfig/inventory']
DEFAULT_REMOTE_USER(/home/ansible/emb-toveri/Ansible/ansible.cfg) = ansible
DEFAULT_STDOUT_CALLBACK(/home/ansible/emb-toveri/Ansible/ansible.cfg) = debug
DEFAULT_VAULT_PASSWORD_FILE(/home/ansible/emb-toveri/Ansible/ansible.cfg) = *************
INTERPRETER_PYTHON(/home/ansible/emb-toveri/Ansible/ansible.cfg) = /usr/bin/python3
OS / ENVIRONMENT / Zabbix Version

Ubuntu 20.04.6 LTS
Zabbix agent 6.4
Python3.8.10

STEPS TO REPRODUCE

Sorry for skimping out on this.

EXPECTED RESULTS
ACTUAL RESULTS

@pyrodie18
Copy link
Collaborator

What version of the role are you using?

@kivilahtio
Copy link
Author

I cloned the source code and am using tag v2.4.0 (5bf4309)

@BGmot
Copy link
Collaborator

BGmot commented Jun 1, 2024

Probably you are using wrong group/host vars files. These variables need to be defined for your Zabbix WebUI host.
Try using group_vars/all.yml or define the for the host defined in zabbix_api_server_host variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants