Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complete fix for #166 #168

Merged
merged 2 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions tasks/deploy_netbox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@
when:
- netbox_stable and netbox_stable_version is version('3.2.2', '>')
and netbox_stable_version is version('3.7.0', '<')
or netbox_git and _netbox_git_contains_add_clearcache.rc == 0
and _netbox_git_contains_remove_clearcache != 0
or netbox_git and ( _netbox_git_contains_add_clearcache.rc == 0
and _netbox_git_contains_remove_clearcache.rc != 0 )

become: true
become_user: "{{ netbox_user }}"
18 changes: 9 additions & 9 deletions tasks/install_via_git.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,18 +89,18 @@
changed_when: False
failed_when: "_netbox_git_contains_add_clearcache.rc not in [0, 1]"

- name: Check existence of commit 2d1f882, removing the clearcache command
shell: 'set -o pipefail; git log --format=%H "{{ netbox_git_version }}" | grep ^2d1f88272497ca72d2e1eca8e291c04538c6810e'
args:
chdir: "{{ netbox_git_repo_path }}"
executable: /bin/bash
register: _netbox_git_contains_remove_clearcache
changed_when: False
failed_when: "_netbox_git_contains_remove_clearcache.rc not in [0, 1]"

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

- name: Check existence of commit 2d1f882, removing the clearcache command
shell: 'set -o pipefail; git log --format=%H "{{ netbox_git_version }}" | grep ^2d1f88272497ca72d2e1eca8e291c04538c6810e'
args:
chdir: "{{ netbox_git_repo_path }}"
executable: /bin/bash
register: _netbox_git_contains_remove_clearcache
changed_when: False
failed_when: "_netbox_git_contains_remove_clearcache.rc not in [0, 1]"

- name: Archive and extract snapshot of git repository
shell: 'set -o pipefail; git archive "{{ netbox_git_version }}" | tar -x -C "{{ netbox_git_deploy_path }}"'
args:
Expand Down