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

fix: make statusport really optional #1376

Closed
wants to merge 1 commit into from
Closed

fix: make statusport really optional #1376

wants to merge 1 commit into from

Conversation

darkobas2
Copy link

Status port is supposed to be configured when zabbix_agent2_statusport is defined. Since its defined in defaults its always defined. Therefore we remove it from default

roles/zabbix_agent/templates/agent.conf.j2

  • {{ (zabbix_agent_statusport is defined and zabbix_agent_statusport is not none) | ternary('', '# ') }}StatusPort={{ zabbix_agent_statusport | default('') }}
COMPONENT NAME

agent2

Status port is supposed to be configured when zabbix_agent2_statusport
is defined. Since its defined in defaults its always defined.
Therefore we remove it from default

roles/zabbix_agent/templates/agent.conf.j2
  - {{ (zabbix_agent_statusport is defined and zabbix_agent_statusport is not none) | ternary('', '# ') }}StatusPort={{ zabbix_agent_statusport | default('') }}
@pyrodie18
Copy link
Collaborator

I am pretty sure that there are several variables within the configuration files that are optional, but still have a value in defaults/vars for one reason or another. I hesitate to remove this right now for two reasons. 1. It being there isn't breaking anything (that I'm tracking). 2. Removing it may break a someone's existing deployment which would make this a breaking change that we would only do on a major release (don't expect we'll be doing one of those for a while since we just released 3.0. If this is causing you problems, I would suggest defining in your vars a null value to override it.

Thoughts @BGmot, @masa-orca, @eb4x

@darkobas2
Copy link
Author

cool, ill go with null for now

@darkobas2 darkobas2 closed this Aug 23, 2024
@BGmot
Copy link
Collaborator

BGmot commented Aug 23, 2024

I am pretty sure that there are several variables within the configuration files that are optional, but still have a value in defaults/vars for one reason or another. I hesitate to remove this right now for two reasons. 1. It being there isn't breaking anything (that I'm tracking). 2. Removing it may break a someone's existing deployment which would make this a breaking change that we would only do on a major release (don't expect we'll be doing one of those for a while since we just released 3.0. If this is causing you problems, I would suggest defining in your vars a null value to override it.

Thoughts @BGmot, @masa-orca, @eb4x

Agree with your statement.

@pyrodie18
Copy link
Collaborator

OK, I hear what @evilhamsterman is saying in #1384

@pyrodie18
Copy link
Collaborator

forgot to hit the re-open button

darkobas2 added a commit to darkobas2/community.zabbix that referenced this pull request Oct 5, 2024
Status port is supposed to be configured when zabbix_agent2_statusport
is defined. Since its defined in defaults its always defined.
Therefore we remove it from default

roles/zabbix_agent/templates/agent.conf.j2
  - {{ (zabbix_agent_statusport is defined and zabbix_agent_statusport is not none) | ternary('', '# ') }}StatusPort={{ zabbix_agent_statusport | default('') }}

- replacement patch for ansible-collections#1376 as it was already deleted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants