ansible-collections / community.zabbix

Zabbix Ansible modules
http://galaxy.ansible.com/community/zabbix
Other
321 stars 280 forks source link

Zabbix Agent role - wrong set_fact if definition #1314

Closed david-sieg closed 2 months ago

david-sieg commented 3 months ago
SUMMARY

I wondered why my defined variable zabbix_agent_logfile isn't recognized. Due to wrong if condition default _logfile is used.

wrong if

ISSUE TYPE
COMPONENT NAME
- name: Set Variables
  ansible.builtin.set_fact:
    zabbix_agent_include: "{{ zabbix_agent_include is defined | ternary(zabbix_agent_include, _include) }}"
    zabbix_agent_logfile: "{{ zabbix_agent_logfilee is defined | ternary(zabbix_agent_logfile, _logfile) }}"
    zabbix_agent_package: "{{ zabbix_agent_package is defined | ternary(zabbix_agent_package, _agent_package) }}"
    zabbix_agent_pidfile: "{{ zabbix_agent_pidfile is defined | ternary(zabbix_agent_pidfile, _pidfile) }}"
    zabbix_agent_service: "{{ zabbix_agent_service is defined | ternary(zabbix_agent_service, _agent_service) }}"
    zabbix_agent_tls_subject: "{{ zabbix_agent_tls_subject is defined | ternary(zabbix_agent_tls_subject, _tls_subject) }}"
    zabbix_agent_tlsaccept: "{{ zabbix_agent_tlsaccept is defined | ternary(zabbix_agent_tlsaccept, 'unencrypted')}}"
    zabbix_agent_tlsconnect: "{{ zabbix_agent_tlsconnect is defined | ternary(zabbix_agent_tlsconnect, 'unencrypted')}}"
ANSIBLE VERSION

2.15.11

EXPECTED RESULTS

Running deployment of Zabbix Agent.