Closed PrismaComputer closed 3 years ago
Hi @PrismaComputer
You'll need to configure it with:
zabbix_agent_server: '{{ zabbix_server }}'
zabbix_agent_serveractive: '{{ zabbix_server }}'
See the documentation on: https://github.com/ansible-collections/community.zabbix/blob/main/docs/ZABBIX_AGENT_ROLE.md
SUMMARY
zabbix_agentd.conf ServerActive= and Server= is actively set to empty
ISSUE TYPE
COMPONENT NAME
zabbix_agent
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT / Zabbix Version
Ubuntu 20.04
STEPS TO REPRODUCE
The aim is to set up a zabbix agent in ACTIVE mode. Problem:
zabbix_agentd.conf server and serveractive is actively set to empty EVEN THOUGH I already tried fixed strings instead of {{ zabbix_server }}. By the way, zabbix_url: 'https://{{ zabbix_server }}' works and host and host_groups are created on Zabbix 5.2 server. So, this proofs the variable is filled. But anyway, tried already fixed strings.
Could it have to do with zabbix_agent_interfaces? We have manually set up hosts in zabbix server which work perfectly in ACTIVE mode, and they have the interface configuration shown in yml below. So I adapted it.
hosts file:
[xxx] master1 ansible_host=master1.xxx.com ansible_port=22 hosted_by=SuperHoster master2 ansible_host=master2.xxx.com ansible_port=22 hosted_by=SuperHoster
[xxx:vars] ansible_user=xxx ansible_ssh_private_key_file=./.ssh/id_rsa ansible_sudo_pass={{ enc_ansible_sudo_pass }} zabbix_server=zabbix.xxx.com
EXPECTED RESULTS
zabbix_agentd.conf server=zabbix.xxx.com and serveractive=zabbix.xxx.com
ACTUAL RESULTS
zabbix_agentd.conf server= and serveractive= is actively set to empty.