Merge "Fix ansible-lint rules tests"

This commit is contained in:
Zuul 2020-06-18 06:11:45 +00:00 committed by Gerrit Code Review
commit 8fe78addbf
2 changed files with 9 additions and 1 deletions

View File

@ -0,0 +1,5 @@
parseable: true
quiet: false
rulesdir:
- ../../.rules/
verbosity: 1

View File

@ -1,6 +1,7 @@
- hosts: all
roles:
- ensure-pip
- ensure-virtualenv
tasks:
- name: Create tempdir for ansible-lint venv
tempfile:
@ -37,7 +38,8 @@
- name: Make sure faulty roles fail linting
command: >-
{{ ansible_lint_tempdir.path }}/bin/ansible-lint -c /dev/null
{{ ansible_lint_tempdir.path }}/bin/ansible-lint
-c test-playbooks/ansible-lint-rules/ansible-lint.yaml
-t {{ item | regex_replace('.*/(ZUULJOBS.*?)/.*', '\1') }}
{{ item }}
args:
@ -49,6 +51,7 @@
- name: Make sure valid roles pass linting
command: >-
{{ ansible_lint_tempdir.path }}/bin/ansible-lint
-c test-playbooks/ansible-lint-rules/ansible-lint.yaml
-t {{ item | regex_replace('.*/(ZUULJOBS.*?)/.*', '\1') }}
{{ item }}
args: