maxhoesel-ansible/ansible-collection-smallstep

Use the new argument spec validation for roles

Closed this issue · 0 comments

ansible-core 2.11 introduced a new argument spec method for roles that enables role parameter checks similar to those used in modules. Switching to these would allow us to remove our own parameter-checking tasks and probably catch a few more user errors.

According to the docs, it's possible to implement this argspec on roles while maintaining backwards-compatibility. That said, we'd still need to keep the old checks around for older ansible versions, at least while we're still supporting them. This might lead to the checks firing twice for newer versions, once from the argspec and once from our own tasks, but that should be preventable with a check against ansible_version