-
Notifications
You must be signed in to change notification settings - Fork 782
fix: replace deprecated community.general.yaml callback plugin #918
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
base: master
Are you sure you want to change the base?
Conversation
schurzi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a good idea. This however breaks our compatability with EL8 distros. Most of them are still in support, so I'd not like to drop that. Can you try adding the dependency to the current version of community.general in the collection requirements?
Yeah, RHEL is still supported for 3.5 more years. So let's try to support that. |
4fb4a33 to
22fb384
Compare
galaxy.yml
Outdated
| ansible.posix: '>=1.0.0' | ||
| community.crypto: '>=1.0.0' | ||
| community.general: '>=1.0.0' | ||
| community.general: '>=1.0.0,<12.0.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can make this futureproof by forcing a higher version instead. I found no deprecation of EL8 support for community.general.
| community.general: '>=1.0.0,<12.0.0' | |
| community.general: '>=12.0.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused now. We seem to be stuck between two incompatible requirements.
If we use community.general: '>=12.0.0':
- Future-proof, users get the latest community.general
- Must switch to
result_format: yamlinmolecule.yml - But this breaks the EL8 support (get community.general <12.0.0 with yaml callback)
If we use community.general: '<12.0.0':
- Maintains EL8 support
- Keep
callbacks_enabled: profile_tasks, timer, yamlinmolecule.yml - BUT locks ALL users to outdated community.general
Or is there another approach I'm missing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another option: Removing the yaml callback entirely:
callbacks_enabled: profile_tasks, timerThis would work on all distros without version pinning on community.general, but we lose pretty YAML-formatted output in test logs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- But this breaks the EL8 support
This is not correct and the source of your confusion. We currently declare a dependency on version 1.0.0, this version does not support the new way of things, because the new Ansible version already ships the current community.general version everything works. The older Ansible version from EL8 does include an older community.general version, that satisfies our collection requirements, but does not have the feature. When we declare a explicit dependency to the current community.general version, Ansible will update the community.general collection on the older EL8 targets to a compatible version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... which is also not correct from my side ... version 12.0.0 declares a dependency to Ansible >2.17 ... which is not possible on EL8 :D
https://galaxy.ansible.com/api/v3/plugin/ansible/content/published/collections/index/community/general/versions/
{
"version": "12.0.0",
"href": "/api/v3/plugin/ansible/content/published/collections/index/community/general/versions/12.0.0/",
"created_at": "2025-11-03T18:41:29.965355Z",
"updated_at": "2025-11-03T18:41:30.188202Z",
"requires_ansible": ">=2.17.0",
"marks": []
},Signed-off-by: Norman Ziegner <[email protected]>
22fb384 to
21cf879
Compare
Replace the removed community.general.yaml callback with the
result_formatoption in ansible.builtin.default callback plugin.The community.general.yaml callback plugin has been removed in community.general 12.0.0. The replacement is to use
result_format=yamlwith the default callback plugin from ansible-core 2.13+.