Skip to content

Commit e00faa5

Browse files
committed
Run check for clearcache removal commit under "become"
...like the other checks.
1 parent af71283 commit e00faa5

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

tasks/install_via_git.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,18 +89,18 @@
8989
changed_when: False
9090
failed_when: "_netbox_git_contains_add_clearcache.rc not in [0, 1]"
9191

92+
- name: Check existence of commit 2d1f882, removing the clearcache command
93+
shell: 'set -o pipefail; git log --format=%H "{{ netbox_git_version }}" | grep ^2d1f88272497ca72d2e1eca8e291c04538c6810e'
94+
args:
95+
chdir: "{{ netbox_git_repo_path }}"
96+
executable: /bin/bash
97+
register: _netbox_git_contains_remove_clearcache
98+
changed_when: False
99+
failed_when: "_netbox_git_contains_remove_clearcache.rc not in [0, 1]"
100+
92101
become: true
93102
become_user: "{{ netbox_user }}"
94103

95-
- name: Check existence of commit 2d1f882, removing the clearcache command
96-
shell: 'set -o pipefail; git log --format=%H "{{ netbox_git_version }}" | grep ^2d1f88272497ca72d2e1eca8e291c04538c6810e'
97-
args:
98-
chdir: "{{ netbox_git_repo_path }}"
99-
executable: /bin/bash
100-
register: _netbox_git_contains_remove_clearcache
101-
changed_when: False
102-
failed_when: "_netbox_git_contains_remove_clearcache.rc not in [0, 1]"
103-
104104
- name: Archive and extract snapshot of git repository
105105
shell: 'set -o pipefail; git archive "{{ netbox_git_version }}" | tar -x -C "{{ netbox_git_deploy_path }}"'
106106
args:

0 commit comments

Comments
 (0)