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: add default value to zabbix_proxy_tlsaccept and zabbix_proxy_tlsconnect in create api call argument #1372

Merged
merged 2 commits into from
Aug 16, 2024

Conversation

miettal
Copy link
Contributor

@miettal miettal commented Aug 15, 2024

null default for these variables was introduced in #1019. But #1291 dropped this. So currently zabbix_proxy role is not working. This PR restore past behavior.

first commit is just adding null default value in defaults/main.yml, but I changed to adding API call argument tasks/main.yml based on review comment in second commit.

see also

SUMMARY
ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

zabbix_proxy role

ADDITIONAL INFORMATION

…onnect

null default for these variables was introduced in ansible-collections#1019. But ansible-collections#1291
dropped this. So currently zabbix_proxy role is not working. This PR
restore past behavior.

see also
 - ansible-collections#1019
 - ansible-collections#1291
@pyrodie18
Copy link
Collaborator

I'm confused. What specifically is breaking by not having the variable defined and what does having a null value fix? Just looking through, it looks like everything is handled gracefully with both a undefined and a null value.

@miettal
Copy link
Contributor Author

miettal commented Aug 15, 2024

see #1019
@loricvdt explained it. @pyrodie18 you are reviewer this PR.

@miettal
Copy link
Contributor Author

miettal commented Aug 15, 2024

tls_connect: "{{ zabbix_proxy_tls_config[zabbix_proxy_tlsaccept if zabbix_proxy_tlsaccept else 'no_encryption'] }}"

this line require defenition of zabbix_proxy_tlsaccept, not allowed undefined. // checking defined or not by define() is also solution.

@pyrodie18
Copy link
Collaborator

OK then would suggest we do it the right way and sanity check vs just leaving a null value floating.

@miettal
Copy link
Contributor Author

miettal commented Aug 16, 2024

OK. I'll rewrite PR.

@miettal miettal changed the title fix: add null default to zabbix_proxy_tlsaccept and zabbix_proxy_tlsconnect fix: add default value to zabbix_proxy_tlsaccept and zabbix_proxy_tlsconnect in create api call argument Aug 16, 2024
@miettal
Copy link
Contributor Author

miettal commented Aug 16, 2024

done

@pyrodie18 pyrodie18 merged commit 2c7f877 into ansible-collections:main Aug 16, 2024
78 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants