From 14f4d04d2b618a5275d21d2fd643955557722d8e Mon Sep 17 00:00:00 2001 From: saibotk Date: Sat, 13 Aug 2022 19:33:18 +0200 Subject: [PATCH] lint: fix config --- .gitlab-ci.yml | 7 ++++++- Makefile | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 801e6cb..11667b7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -15,12 +15,17 @@ stages: ansible-lint: stage: lint + variables: + ANSIBLE_CONFIG: "$CI_PROJECT_DIR/ansible.lint.cfg" script: - ansible-lint --version - - ANSIBLE_CONFIG=ansible.lint.cfg ansible-lint -f codeclimate |& tee ansible-lint-report.json + - ansible-lint --offline -f codeclimate roles/ playbooks/ > ansible-lint-report.json artifacts: + paths: + - "ansible-lint-report.json" reports: codequality: ansible-lint-report.json + when: always # Automated month-based releases release-branch: diff --git a/Makefile b/Makefile index 65c535f..97477af 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_CONFIG=ansible.lint.cfg ansible-lint + ANSIBLE_CONFIG=ansible.lint.cfg ansible-lint --offline roles/ playbooks/ install: ## Install or update requirements ansible-galaxy install -f -r requirements.yml