File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 204
204
app_path : " {{ netbox_current_path }}/netbox"
205
205
virtualenv : " {{ netbox_virtualenv_path }}"
206
206
207
- - name : Clear cached data in NetBox
207
+ - name : Clear cached data in NetBox < 3
208
208
django_manage :
209
209
command : " invalidate all"
210
210
app_path : " {{ netbox_current_path }}/netbox"
213
213
- netbox_stable and netbox_stable_version is version('3.0.0', '<')
214
214
or netbox_git and _netbox_git_contains_invalidate_removed.rc != 0
215
215
216
- - name : Clear cached data in NetBox 3.2.3+
216
+ - name : Clear cached data in NetBox 3.2.3 to 3.6
217
217
django_manage :
218
218
command : " clearcache"
219
219
app_path : " {{ netbox_current_path }}/netbox"
220
220
virtualenv : " {{ netbox_virtualenv_path }}"
221
221
when :
222
222
- netbox_stable and netbox_stable_version is version('3.2.2', '>')
223
- or netbox_git and _netbox_git_contains_add_clearcache.rc == 0
223
+ 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
226
225
227
become : true
226
228
become_user : " {{ netbox_user }}"
Original file line number Diff line number Diff line change 92
92
become : true
93
93
become_user : " {{ netbox_user }}"
94
94
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
+
95
104
- name : Archive and extract snapshot of git repository
96
105
shell : ' set -o pipefail; git archive "{{ netbox_git_version }}" | tar -x -C "{{ netbox_git_deploy_path }}"'
97
106
args :
You can’t perform that action at this time.
0 commit comments