From d8b9239324c2de9255bbd229068feff4be9810d6 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 24 Oct 2017 08:28:22 +0200 Subject: [PATCH] Silence ansible-lint Add tags to tell ansible-lint to ignore the problems found since those are false positives. Needed-By: I16186c929e7d0e6e34b35271559e555255a52b00 Change-Id: I59e5d41a9539671ee5aab9b9036379eb9101d021 --- roles/revoke-sudo/tasks/main.yaml | 3 +++ roles/version-from-git/tasks/main.yaml | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/roles/revoke-sudo/tasks/main.yaml b/roles/revoke-sudo/tasks/main.yaml index f97c6ede1..477c3c873 100644 --- a/roles/revoke-sudo/tasks/main.yaml +++ b/roles/revoke-sudo/tasks/main.yaml @@ -6,3 +6,6 @@ - name: Prove that general sudo access is actually revoked. shell: '! sudo -n true' + tags: + # We really need shell above, skip warning + - skip_ansible_lint diff --git a/roles/version-from-git/tasks/main.yaml b/roles/version-from-git/tasks/main.yaml index 420ef7deb..f203e661a 100644 --- a/roles/version-from-git/tasks/main.yaml +++ b/roles/version-from-git/tasks/main.yaml @@ -4,6 +4,10 @@ register: scm_sha_output args: chdir: "{{ zuul_work_dir }}" + # Skip linting since it triggers on the "git" command, + # but rev-parse is not supported by ansible git module. + tags: + - skip_ansible_lint - name: Set scm_sha fact set_fact: