lint: fix config

This commit is contained in:
saibotk 2022-08-13 19:33:18 +02:00
parent 5393a8ebbc
commit 14f4d04d2b
Signed by: saibotk
GPG key ID: 67585F0065E261D5
2 changed files with 7 additions and 2 deletions

View file

@ -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:

View file

@ -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