-
-
Notifications
You must be signed in to change notification settings - Fork 282
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
It appears that MegaLinter does not properly handle Ansible handlers imported using the import_tasks directive.
When attempting to import handlers as shown below:
After some investigation, the following potential workarounds were identified:
- Ignore the rule triggering the false positive.
- Refactor the playbook into a role, so the handlers are imported as /handlers/main.yml.
- Define the handlers directly within the playbook instead of importing them.
To Reproduce
- Create an Ansible playbook with a separate handlers file.
- Import the handlers file into the playbook using import_tasks, for example:
handlers:
- import_tasks: ./handlers/main.yml
- Run MegaLinter against the playbook.
Expected behavior
MegaLinter should correctly recognize and validate handlers imported via import_tasks, rather than raising an error.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working