Duplicate task name in role #1710
Unanswered
MarkusTeufelberger
asked this question in
New rules
Replies: 1 comment
-
I agree, I think having a requirement to have unique task names per file should be a rule, not only for starting at tasks but for clarity on knowing what task is causing you issues. We already have rules based on that logic but not this yet. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm not 100% sure if this is even a desired rule or how to check for it, but here we go:
Within at least roles, if not even whole playbooks (hard to enforce with external roles though) the
name
value of tasks and handlers should be unique. This makes the following feature work correctly:ansible-playbook playbook.yml --start-at-task="install packages"
(https://docs.ansible.com/ansible/latest/user_guide/playbooks_startnstep.html)
It also makes it easier to find a failing task directly via a search instead of having to guess which one of the "deploy configuration" or "restart service" tasks is the actual one that's being run at the moment.
Beta Was this translation helpful? Give feedback.
All reactions