diff --git a/test-playbooks/ansible-lint-rules/ansible-lint.yaml b/test-playbooks/ansible-lint-rules/ansible-lint.yaml new file mode 100644 index 000000000..958c58202 --- /dev/null +++ b/test-playbooks/ansible-lint-rules/ansible-lint.yaml @@ -0,0 +1,5 @@ +parseable: true +quiet: false +rulesdir: + - ../../.rules/ +verbosity: 1 diff --git a/test-playbooks/ansible-lint-rules/run.yaml b/test-playbooks/ansible-lint-rules/run.yaml index 900394ebc..9842c1da1 100644 --- a/test-playbooks/ansible-lint-rules/run.yaml +++ b/test-playbooks/ansible-lint-rules/run.yaml @@ -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: