From e117d34e910df3ab1bb5f11ad73379c04051f897 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 28 Oct 2017 16:33:05 +0200 Subject: [PATCH] ansible-lint: Handle some git warnings Ignore some places where ansible warns about git usage. Change-Id: I9c5c19cca8c1c32ee0cde85e2ec66140364c14bc --- playbooks/release/pre.yaml | 3 +++ roles/use-cached-repos/tasks/main.yaml | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/playbooks/release/pre.yaml b/playbooks/release/pre.yaml index 27aa016a53..384089ad47 100644 --- a/playbooks/release/pre.yaml +++ b/playbooks/release/pre.yaml @@ -6,6 +6,9 @@ args: chdir: "{{ ansible_user_dir }}/src/{{ item.canonical_name }}" with_items: "{{ zuul._projects.values() | list }}" + # ANSIBLE0006: git remote add is not supported by ansible module + tags: + - skip_ansible_lint roles: - role: configure-git git_config: diff --git a/roles/use-cached-repos/tasks/main.yaml b/roles/use-cached-repos/tasks/main.yaml index 5825d0bdd8..40440e6dd6 100644 --- a/roles/use-cached-repos/tasks/main.yaml +++ b/roles/use-cached-repos/tasks/main.yaml @@ -12,6 +12,10 @@ with_together: - "{{ zuul._projects.values() | list }}" - "{{ cached_repos.results }}" + # ANSIBLE0006: If we use the git module, we get warning + # ANSIBLE0004 since we do not give an explicit version + tags: + - skip_ansible_lint - name: Clone upstream repo to workspace command: "git clone https://{{ item.0.canonical_hostname }}/{{ item.0.name}} {{ ansible_user_dir }}/{{ item.0.src_dir}}" @@ -21,9 +25,16 @@ with_together: - "{{ zuul._projects.values() | list }}" - "{{ cached_repos.results }}" + # ANSIBLE0006: If we use the git module, we get warning + # ANSIBLE0004 since we do not give an explicit version + tags: + - skip_ansible_lint - name: Remove origin from local git repos command: "git remote rm origin" args: chdir: "{{ ansible_user_dir }}/{{ item.src_dir}}" with_items: "{{ zuul._projects.values() | list }}" + # ANSIBLE0006: git remote is not supported by ansible module + tags: + - skip_ansible_lint