Currently supported versions of ansible-core

Tried to bump a collection’s meta to minimal 2.13.9 but got meta-runtime[unsupported-version]: requires_ansible key must be set to a supported version (chore: bump ansible version · charlesrocket/essential-collection@dec5782 · GitHub). While checking meta-runtime - Ansible Lint Documentation I decided to push 2.15.0 but sanity tests went red with Warning: : Collection charlesrocket.essential does not support Ansible version (fix(git): rename internal variables · charlesrocket/essential-collection@447c204 · GitHub)

Requiring ansible-core 2.14.0 resolves linter and sanity tests. I see 2.13.x is gone so this is outdated docs but not sure why I can’t go with the current 2.15.0 https://github.com/ansible/ansible-lint/blob/cba7c512bb94a2ad36109f20358475ae18c88bc6/src/ansiblelint/rules/meta_runtime.py#L34

I really hate this rule and I actively disable it for all collections I maintain that use ansible-lint. I don’t see any reason why this rule should be enabled by default in ansible-lint. I can only recommend disabling it in .ansible-lint.

1 Like

This is because you’re running the tests with 2.14. https://github.com/charlesrocket/essential-collection/blob/b3840601a14ff0b0ef33179d61f099c31c572ba7/.github/workflows/ci.yml#L29C1-L32C31 calls ansible-community/ansible-test-gh-action without specifying ansible-core-version, and the default value is stable-2.14.

Ideally you should be running the tests with each major version of Ansible that your collection supports. You can see an example of doing so at https://github.com/ansible-collections/collection_template/blob/eb70f93f3663f5847d763e6dec414395eff9b05b/.github/workflows/ansible-test.yml#L62-L111

3 Likes

Oh I see now, my layout is out of date, thanks. The Default version still should be the current one.