From 3cad55f09864b828c8f75d1b6992782bcb3bbb80 Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Thu, 18 Feb 2021 11:13:01 +0000 Subject: [PATCH] Add ability to detect molecule base.yml configs (#1374) Fixes: #1369 --- src/ansiblelint/config.py | 2 +- test/TestUtils.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ansiblelint/config.py b/src/ansiblelint/config.py index 73eeebcd2b..e6528e90a5 100644 --- a/src/ansiblelint/config.py +++ b/src/ansiblelint/config.py @@ -26,7 +26,7 @@ { "requirements": "**/molecule/*/collections.{yaml,yml}" }, # molecule old collection requirements (v1), ansible 2.8 only - {"yaml": "**/molecule/*/molecule.{yaml,yml}"}, # molecule config + {"yaml": "**/molecule/*/{base,molecule}.{yaml,yml}"}, # molecule config {"playbook": "**/molecule/*/*.{yaml,yml}"}, # molecule playbooks {"yaml": "**/*.{yaml,yml}"}, {"yaml": "**/.*.{yaml,yml}"}, diff --git a/test/TestUtils.py b/test/TestUtils.py index 2d1951fb0b..0ff60c067a 100644 --- a/test/TestUtils.py +++ b/test/TestUtils.py @@ -340,6 +340,7 @@ def test_is_playbook(): ("playbooks/roles/foo.yml", "yaml"), # the only yml file that is not a playbook inside molecule/ folders (".config/molecule/config.yml", "yaml"), # molecule shared config + ("roles/foo/molecule/scen1/base.yml", "yaml"), # molecule scenario base config ("roles/foo/molecule/scen1/molecule.yml", "yaml"), # molecule scenario config ("roles/foo/molecule/scen2/foobar.yml", "playbook"), # custom playbook name ("roles/foo/molecule/scen3/converge.yml", "playbook"), # common playbook name