Skip to content

Commit 7fda785

Browse files
authored
Merge pull request #168 from sleinen/166_clearcache_git_fix
Complete fix for #166
2 parents fdcc4e3 + e00faa5 commit 7fda785

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

tasks/deploy_netbox.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,8 @@
221221
when:
222222
- netbox_stable and netbox_stable_version is version('3.2.2', '>')
223223
and netbox_stable_version is version('3.7.0', '<')
224-
or netbox_git and _netbox_git_contains_add_clearcache.rc == 0
225-
and _netbox_git_contains_remove_clearcache != 0
224+
or netbox_git and ( _netbox_git_contains_add_clearcache.rc == 0
225+
and _netbox_git_contains_remove_clearcache.rc != 0 )
226226

227227
become: true
228228
become_user: "{{ netbox_user }}"

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)