File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 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+
217
+ django_manage :
218
+ command : " clearcache"
219
+ app_path : " {{ netbox_current_path }}/netbox"
220
+ virtualenv : " {{ netbox_virtualenv_path }}"
221
+ when :
222
+ - netbox_stable and netbox_stable_version is version('3.2.2', '>')
223
+ or netbox_git and _netbox_git_contains_add_clearcache.rc == 0
216
224
217
225
become : true
218
226
become_user : " {{ netbox_user }}"
Original file line number Diff line number Diff line change 78
78
changed_when : False
79
79
failed_when : " _netbox_git_contains_invalidate_removed.rc not in [0, 1]"
80
80
81
+ - name : Check existence of commit b172ae6, adding the clearcache command
82
+ shell : ' set -o pipefail; git log --format=%H "{{ netbox_git_version }}" | grep ^b172ae65d24f6dc161c4b609477a4547bb62a50b'
83
+ args :
84
+ chdir : " {{ netbox_git_repo_path }}"
85
+ executable : /bin/bash
86
+ register : _netbox_git_contains_add_clearcache
87
+ changed_when : False
88
+ failed_when : " _netbox_git_contains_add_clearcache.rc not in [0, 1]"
89
+
81
90
- name : Archive and extract snapshot of git repository
82
91
shell : ' set -o pipefail; git archive "{{ netbox_git_version }}" | tar -x -C "{{ netbox_git_deploy_path }}"'
83
92
args :
You can’t perform that action at this time.
0 commit comments