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

Fixed use of bare vars on agent2 tasks for linux #663

Merged
merged 1 commit into from
Apr 4, 2022

Conversation

danilomendes
Copy link
Contributor

  • Added bool filter on zabbix_agent2 and zabbix_agent_package_remove vars
  • Removed implicit conditionals on psk files vars when "is defined" should be enough
SUMMARY

Those tasks began to fail in my setup, and I found this note on ansible docs: "In 2.10 the default setting for conditional_bare_variables will change to false. In 2.12 the old behavior will be deprecated." (https://docs.ansible.com/ansible/latest/porting_guides/porting_guide_2.8.html). The hints I found on my logs are the same on #662 and #655.

These commits resolved the issue for me.

Fixes #662
Fixes #655

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

zabbix_agent

ADDITIONAL INFORMATION
when:
  - zabbix_agent2_tlspskfile is defined
  - zabbix_agent2_tlspskfile

I could not get exactly what was the intention of the second check. Since it is after the first "is defined" check, I assumed it was to check implicitly if it is an valid string (maybe not empty). I removed it (this second line) because I think the first check makes it safe enough and I can think a better way to ensure it is a valid filename.

- Added bool filter on zabbix_agent2 and zabbix_agent_package_remove vars
- Removed implicit conditionals on psk files vars when "is defined" should be enough
@dj-wasabi dj-wasabi merged commit d8c9a35 into ansible-collections:main Apr 4, 2022
@dj-wasabi
Copy link
Contributor

Thanks! 👍

@shk3bq4d
Copy link
Contributor

I could not get exactly what was the intention of the second check. Since it is after the first "is defined" check, I assumed it was to check implicitly if it is an valid string (maybe not empty). I removed it (this second line) because I think the first check makes it safe enough and I can think a better way to ensure it is a valid filename.

reasoning is explained in #515

I have opened #680 to revert your change on this specific point

@barzog barzog mentioned this pull request May 4, 2022
@D3DeFi
Copy link
Contributor

D3DeFi commented May 24, 2022

@dj-wasabi can you check the regression issue please? I would like to release 1.7.0 in the following days and feel like this should be addressed before than

D3DeFi added a commit to D3DeFi/community.zabbix that referenced this pull request May 24, 2022
dj-wasabi pushed a commit that referenced this pull request May 24, 2022
* zabbix_proxy role - fix regression of #528 caused in #663

* added changelog fragment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants