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] TLSPSKFile config is always set breaking configuration #1297

Closed
Kajot-dev opened this issue Jun 18, 2024 · 3 comments
Closed
Labels
bug Something isn't working role The issue or pull request is related to Zabbix role

Comments

@Kajot-dev
Copy link

SUMMARY

Zabbix agent role has a default value for zabbix_agent_tlspskfile set. Then when templating .conf file

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

There is only check whether this variable is not defined or null. This leads to invalid configuration when using zabbix_agent_tlsconnect or zabbix_agent_tlsaccept is set to for example cert:

cannot use encryption configuration: TLSPSKFile configuration parameter set without PSK being used
ISSUE TYPE
  • Bug Report
COMPONENT NAME

Zabbix agent role

ANSIBLE VERSION
2.17.0
OS / ENVIRONMENT / Zabbix Version

Zabbix 7.0

STEPS TO REPRODUCE

Try to configure zabbix agent with the role using "cert" mode. Role completes successfully but zabbix-agent2 service fails instantly

EXPECTED RESULTS

TLSPSKFile is not set when zabbix_agent_tlsconnect and/or zabbix_agent_tlsconnect is set to something different than psk.

ACTUAL RESULTS
cannot use encryption configuration: TLSPSKFile configuration parameter set without PSK being used
@Kajot-dev
Copy link
Author

And using newest release 3.0.0

@Kajot-dev
Copy link
Author

This is even worse. Situation where zabbix_agent_tlspskfile is undefined or None is not even possible because of:

path: "{{ zabbix_agent_tlspskfile }}"

Which will fail

@silveraignacio
Copy link

+1 to this!

@pyrodie18 pyrodie18 added bug Something isn't working role The issue or pull request is related to Zabbix role labels Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working role The issue or pull request is related to Zabbix role
Projects
None yet
Development

No branches or pull requests

3 participants