Merge pull request 'Fix the metadata string' (!16) from adellam/ansible-role-zabbix-agent:master into master

Reviewed-on: #16
This commit is contained in:
Andrea Dell'Amico 2023-02-26 18:50:22 +01:00
commit 364bc15c1d
2 changed files with 2 additions and 5 deletions

View File

@ -25,6 +25,7 @@ zabbix_agent_start_agents: 3
zabbix_agent_passive_checks_status: 'disabled' zabbix_agent_passive_checks_status: 'disabled'
zabbix_agent_hostname: '{{ ansible_fqdn }}' zabbix_agent_hostname: '{{ ansible_fqdn }}'
zabbix_agent_processing_timeout: 3 zabbix_agent_processing_timeout: 3
zabbix_host_metadata: "{{ ansible_system }}"
zabbix_agent_firewalld_services: zabbix_agent_firewalld_services:
- { service: 'zabbix-agent', state: '{{ zabbix_agent_passive_checks_status }}', zone: '{{ firewalld_default_zone }}' } - { service: 'zabbix-agent', state: '{{ zabbix_agent_passive_checks_status }}', zone: '{{ firewalld_default_zone }}' }

View File

@ -183,11 +183,7 @@ Hostname={{ zabbix_agent_hostname }}
# Range: 0-255 characters # Range: 0-255 characters
# Default: # Default:
# HostMetadata= # HostMetadata=
{% if zabbix_authentication_method == "psk" %} HostMetadata={{ zabbix_host_metadata }}
HostMetadata={{ ansible_system }} {{ zabbix_psk_string }}
{% else %}
HostMetadata={{ ansible_system }}
{% endif %}
### Option: HostMetadataItem ### Option: HostMetadataItem
# Optional parameter that defines an item used for getting host metadata. # Optional parameter that defines an item used for getting host metadata.