diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c246fa2..6797040 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,7 +13,7 @@ ansible-lint: stage: lint script: - ansible-lint --version - - ansible-lint -f codeclimate *.yml > ansible-lint-report.json + - ANSIBLE_CONFIG=ansible.lint.cfg ansible-lint -f codeclimate > ansible-lint-report.json artifacts: reports: codequality: ansible-lint-report.json diff --git a/Makefile b/Makefile index 5d549f3..3732a01 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ help: ## Show this help @egrep -h '\s##\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' lint: ## Lint ansible files with ansible-lint - ansible-lint + ANSIBLE_CONFIG=ansible.lint.cfg ansible-lint install: ## Install or update requirements ansible-galaxy install -f -r requirements.yml diff --git a/ansible.lint.cfg b/ansible.lint.cfg new file mode 100644 index 0000000..e6d83fa --- /dev/null +++ b/ansible.lint.cfg @@ -0,0 +1,2 @@ +# Empty stub config file, so ansible-lint does not use the default config's vault_password_file. +# Otherwise ansible-lint always tries to get a vault password and fails.