Skip to content

Commit

Permalink
Recognize collections.yml files (#1371)
Browse files Browse the repository at this point in the history
Fixes: #1369
  • Loading branch information
ssbarnea committed Feb 18, 2021
1 parent 955e4dd commit 0598777
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ansiblelint/config.py
Expand Up @@ -23,6 +23,9 @@
{"vars": "**/{host_vars,group_vars,vars,defaults}/**/*.{yaml,yml}"},
{"meta": "**/meta/main.{yaml,yml}"},
{"yaml": ".config/molecule/config.{yaml,yml}"}, # molecule global config
{
"requirements": "**/molecule/*/collections.{yaml,yml}"
}, # molecule old collection requirements (v1), ansible 2.8 only
{"yaml": "**/molecule/*/molecule.{yaml,yml}"}, # molecule config
{"playbook": "**/molecule/*/*.{yaml,yml}"}, # molecule playbooks
{"yaml": "**/*.{yaml,yml}"},
Expand Down
1 change: 1 addition & 0 deletions test/TestUtils.py
Expand Up @@ -353,6 +353,7 @@ def test_is_playbook():
("examples/group_vars/all.yml", "vars"),
("examples/playbooks/vars/other.yml", "vars"),
("examples/playbooks/vars/subfolder/settings.yml", "vars"), # deep vars
("molecule/scenario/collections.yml", "requirements"), # deprecated 2.8 format
),
)
def test_auto_detect(monkeypatch, path: str, kind: FileType) -> None:
Expand Down

0 comments on commit 0598777

Please sign in to comment.