diff --git a/roles/prepare-workspace/tasks/main.yaml b/roles/prepare-workspace/tasks/main.yaml index 48fc29ac0..07161907e 100644 --- a/roles/prepare-workspace/tasks/main.yaml +++ b/roles/prepare-workspace/tasks/main.yaml @@ -1,6 +1,9 @@ # TODO(pabelanger): Handle cleanup on static nodes - name: Start zuul_console daemon. zuul_console: + tags: + # Avoid "no action detected in task" linter error + - skip_ansible_lint - name: Synchronize src repos to workspace directory. synchronize: diff --git a/roles/stage-output/tasks/main.yaml b/roles/stage-output/tasks/main.yaml index 38d806a31..5b6d2f043 100644 --- a/roles/stage-output/tasks/main.yaml +++ b/roles/stage-output/tasks/main.yaml @@ -90,6 +90,8 @@ shell: "mv {{ item.path }} {{ item.path | regex_replace(extensions_regex, '\\1_\\2.txt') }}" with_items: "{{ log_files_to_rename.files }}" chdir: "{{ stage_dir }}/logs" + tags: + - skip_ansible_lint # NOTE(andreaf) The ansible module does not support recursive archive, so # using gzip is the only option here. The good bit is that gzip itself is @@ -104,3 +106,5 @@ when: - stage_compress_logs - item.type == 'logs' + tags: + - skip_ansible_lint diff --git a/roles/start-zuul-console/tasks/main.yaml b/roles/start-zuul-console/tasks/main.yaml index 393a8f064..2fdcaf913 100644 --- a/roles/start-zuul-console/tasks/main.yaml +++ b/roles/start-zuul-console/tasks/main.yaml @@ -1,3 +1,6 @@ # TODO(pabelanger): Handle cleanup on static nodes - name: Start zuul_console daemon. zuul_console: + tags: + # Avoid "no action detected in task" linter error + - skip_ansible_lint diff --git a/roles/upload-logs/tasks/main.yaml b/roles/upload-logs/tasks/main.yaml index 661ce9aec..69e1cfae9 100644 --- a/roles/upload-logs/tasks/main.yaml +++ b/roles/upload-logs/tasks/main.yaml @@ -56,3 +56,6 @@ zuul: log_url: "{{ zuul_log_url }}/{{ zuul_log_path }}/" when: zuul_log_url is defined + tags: + # Avoid "no action detected in task" linter error + - skip_ansible_lint diff --git a/tox.ini b/tox.ini index 8b9e8bb8b..5c71936c5 100644 --- a/tox.ini +++ b/tox.ini @@ -25,7 +25,7 @@ commands = python setup.py build_sphinx passenv = # NOTE(pabelanger): if you'd like to run tox -elinters locally, you'll need # to export ANSIBLE_ROLES_PATH pointing to the currect repos. - # see infra-zuul-jobs-linters job for more information. + # see openstack-zuul-jobs-linters job for more information. ANSIBLE_ROLES_PATH whitelist_externals = bash commands = @@ -34,6 +34,8 @@ commands = # [ANSIBLE0012] Commands should not change things if nothing needs doing bash -c "find playbooks -type f -regex '.*.ya?ml' -print0 | \ xargs -t -n1 -0 ansible-lint -xANSIBLE0012" + bash -c 'find roles -maxdepth 1 -mindepth 1 -type d -printf "%p/\n" | \ + xargs -t -n1 ansible-lint -xANSIBLE0012' # Ansible Syntax Check bash -c "find playbooks -type f -regex '.*.ya?ml' -exec \ ansible-playbook --syntax-check -i {toxinidir}/tests/inventory \{\} + > /dev/null"