Update Cookiecutter role template for newer ansible-lint
Change-Id: I818b25ba4112f8dc3ac30e93eac256558b258ab1
diff --git "a/cookiecutters/role/\173\173cookiecutter.role_name\175\175/Makefile" "b/cookiecutters/role/\173\173cookiecutter.role_name\175\175/Makefile"
index 1c1bb02..c4d8e94 100644
--- "a/cookiecutters/role/\173\173cookiecutter.role_name\175\175/Makefile"
+++ "b/cookiecutters/role/\173\173cookiecutter.role_name\175\175/Makefile"
@@ -1,6 +1,6 @@
# {{ cookiecutter.role_name }} Makefile
#
-# SPDX-FileCopyrightText: © {{ cookiecutter.year }} {{ cookiecutter.author }} <{{ cookiecutter.email }}>
+# SPDX-FileCopyrightText: {{ cookiecutter.year }} {{ cookiecutter.author }} <{{ cookiecutter.email }}>
# SPDX-License-Identifier: {{ cookiecutter.license }}
SHELL = bash -eu -o pipefail
@@ -12,25 +12,28 @@
molecule --version
molecule test
-lint: yamllint ansiblelint ## run all lint checks
+lint: license yamllint ansiblelint ## run all lint checks
# all YAML files
YAML_FILES ?= $(shell find . -type f \( -name '*.yaml' -o -name '*.yml' \) -print )
+license: ## Check license with the reuse tool
+ reuse --version
+ reuse --root . lint
+
yamllint: ## lint check with yamllint
yamllint --version
yamllint \
-d "{extends: default, rules: {line-length: {max: 99}}}" \
-s $(YAML_FILES)
+# List of molecule files, not including base molecule.yml which isn't ansible format
+MOLECULE_FILES ?= $(shell find molecule -type f -name '*.yml' \! -name 'molecule.yml' -print )
+
ansiblelint: ## lint check with ansible-lint
ansible-lint --version
ansible-lint -v .
- ansible-lint -v molecule/*/*
-
-license: ## Check license with the reuse tool
- reuse --version
- reuse --root . lint
+ ansible-lint -v $(MOLECULE_FILES)
help: ## Print help for each target
@echo {{ cookiecutter.role_name }} test targets