-
Notifications
You must be signed in to change notification settings - Fork 636
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
ansible-lint --fix
should uppercase all handlers passed to notify
#4150
Comments
I'm not entirely sure what you want to happen here, so I'm going to walk through this to make sure I understand the situation correctly. We update handler names in With #4149 merged, the casing issue is now called out when present in a |
I believe what I was inquiring about was that any handler in I do think now that, with your explanation, this may not be a good idea. If a handler comes from a separate collection and is used somewhere in a playbook under |
Summary
When running
ansible-lint --fix
on a playbook that contains task(s) with thenotify
parameter using a list of handlers as its value, these handlers are only fixed for aname[casing]
violation if they exist underhandlers
as a task. Related to #4028.Issue Type
OS / ENVIRONMENT
pip
pip
(also testedmain
branch)STEPS TO REPRODUCE
Setup
Run
ansible-lint --fix "./playbooks/foo.yml"
Desired Behavior
I would have expected that
ansible-lint --fix
would have renamed all handlers passed tonotify
to begin with an upper case letter, regardless of their existence underhandlers
as a task.Actual Behavior
The actual behavior is that the
my handler
handler does get fixed forname[casing]
, but themy handler 1
andmy handler 2
handlers do not.Without verbosity
Modified 1 files. Passed: 0 failure(s), 0 warning(s) on 1 files. Last profile that met the validation criteria was 'production'.
With verbosity
The text was updated successfully, but these errors were encountered: