diff --git a/examples/templates/playbooks/playbook.yml b/examples/templates/playbooks/playbook.yml new file mode 100644 index 00000000000..848ce48de2e --- /dev/null +++ b/examples/templates/playbooks/playbook.yml @@ -0,0 +1,5 @@ +# even if is hosted under playbooks and is named playbook.yml, this file +# is not a real playbook because it is hosted in a "templates" directory +# and that means we will avoid processing it as a playbook. Templates use +# either jinja2 or another templating engine, so we cannot load them. +foo: bar diff --git a/src/ansiblelint/config.py b/src/ansiblelint/config.py index 7d8be12adbc..6d6b8c36f00 100644 --- a/src/ansiblelint/config.py +++ b/src/ansiblelint/config.py @@ -9,6 +9,7 @@ # Do not sort this list, order matters. {"jinja2": "**/*.j2"}, # jinja2 templates are not always parsable as something else {"jinja2": "**/*.j2.*"}, + {"text": "**/templates/**/*.*"}, # templates are likely not validable {"inventory": "**/inventory/**.yml"}, {"requirements": "**/meta/requirements.yml"}, # v1 only # https://docs.ansible.com/ansible/latest/dev_guide/collections_galaxy_meta.html