Skip to content

zabbix.zabbix_agent: zabbix_agent_tlsaccept, zabbix_agent_tlsconnect #1338

@ezekieldas

Description

@ezekieldas
SUMMARY

My configuration uses multiple values for TLSAccept=psk,cert The current template disallows this, looks incorrect, and results in the agent failing on start.

https://github.com/ansible-collections/community.zabbix/blob/main/roles/zabbix_agent/templates/agent.conf.j2#L124

{{ (zabbix_agent_tlsconnect is defined and zabbix_agent_tlsconnect is not none) | ternary('', '# ') }}TLSAccept={{ zabbix_agent_tlsconnect | default('') }}

should be:

{{ (zabbix_agent_tlsconnect is defined and zabbix_agent_tlsconnect is not none) | ternary('', '# ') }}TLSConnect={{ zabbix_agent_tlsconnect | default('') }}
{{ (zabbix_agent_tlsaccept is defined and zabbix_agent_tlsaccept is not none) | ternary('', '# ') }}TLSAccept={{ zabbix_agent_tlsaccept | default('') }}
ISSUE TYPE
  • Bug Report
COMPONENT NAME
ANSIBLE VERSION
ansible 2.10.8
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.10.12 (main, Mar 22 2024, 16:50:05) [GCC 11.4.0]
CONFIGURATION
ANSIBLE_PIPELINING(/etc/ansible/ansible.cfg) = True
DEFAULT_ROLES_PATH(/etc/ansible/ansible.cfg) = ['/etc/ansible/roles']
DEFAULT_VAULT_PASSWORD_FILE(/etc/ansible/ansible.cfg) = /etc/ansible_vault
HOST_KEY_CHECKING(/etc/ansible/ansible.cfg) = False
OS / ENVIRONMENT / Zabbix Version

Zabbix Agent 2 (6.4.16)

STEPS TO REPRODUCE

Use role community.zabbix.zabbix_agent with variable zabbix_agent_tlsaccept: "psk,cert"

EXPECTED RESULTS

TLSAccept=psk,cert

ACTUAL RESULTS

TLSAccept=psk


Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestroleThe issue or pull request is related to Zabbix role

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions