I might have missed the memo, but is the galaxy_info.platforms: key gone or deprecated with the new Galaxy?
ansible-lint gives me: schema[meta]: $.galaxy_info.platforms[1].versions[0] 'Stretch' is not one of ['6.1', '7.1', '7.2', 'all']. See https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_reuse_roles.html#using-role-dependencies which is both confusing and the link seems unrelated.
Follow-up question: I get the same error for EL, where versions are used. No matter, if it is 6, 7 or 8, I get the same error as above. Even if I change it to e.g., 7.1, the message remains.
I only test on Debian and Ubuntu so I don’t know, but you could try quoting the version numbers to ensure they are strings and not integers to see if that helps?
Based on the error message: schema[meta]: $.galaxy_info.platforms[1].versions[0] 'Stretch' is not one of ['6.1', '7.1', '7.2', 'all']. [...]
I am very certain, that the way I note the platforms is not the issue. It gives me only four options: ['6.1', '7.1', '7.2', 'all']
And even using one of those does not seem to do the trick.
Maybe someone else has an idea? I will test this sometime though, perhaps I can find a workaround. But either my mistake is borderline stupid, or something is broken. I don’t care which it is, as long as I can figure it out.
If the error message involves Stretch, you didn’t use the correct form, which is lowercase. That would be stretch.
The limit to ['6.1', '7.1', '7.2', 'all'] is likely an artefact of the schema validation: since it cannot match the whole dict you provided to any of the schemes it knows, it takes the list of values from the first schema, which happens to be for name=AIX and has exactly these four values.
It should report that the given list for the Debian platform does not match: ["bookworm","bullseye","buster","etch","jessie","lenny","sid","squeeze","stretch","trixie", "wheezy","all"], but instead is returning the supported versions for the AIX platform (the very first platform in the list).
@ssbarnea is this a known or previously fixed issue? I see a couple of recently closed related issues, but I didn’t see any PR’s. Just mention that you have to quote integers. In this case, we’re not using integers, we’re using strings with incorrect casing, but the error message is entirely unhelpful because it doesn’t match the platform in question.