Skip to content

Commit 9a44741

Browse files
committed
Bump NetBox to 2.3.6 and retroactively add fix for netbox-community/netbox#2239
1 parent a802293 commit 9a44741

File tree

5 files changed

+19
-2
lines changed

5 files changed

+19
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ tells the role to deploy by extracting tarball releases from GitHub, while
5858
`netbox_git` tells the role to clone a NetBox git repository - they're mutually
5959
exclusive.
6060

61-
netbox_stable_version: 2.3.5
61+
netbox_stable_version: 2.3.6
6262
netbox_stable_uri: "https://github.com/digitalocean/netbox/archive/v{{ netbox_stable_version }}.tar.gz"
6363

6464
These can be configured to pin a version (e.g. increment to trigger an upgrade)

defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
# defaults file for lae.netbox
33
netbox_stable: false
4-
netbox_stable_version: 2.3.5
4+
netbox_stable_version: 2.3.6
55
netbox_stable_uri: "https://github.com/digitalocean/netbox/archive/v{{ netbox_stable_version }}.tar.gz"
66

77
netbox_git: false

meta/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
galaxy_info:
2+
role_name: netbox
23
author: Musee Ullah
34
description: Installs and configures NetBox, a DCIM suite, in a production setting.
45
license: MIT

tasks/deploy_netbox.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@
2525
when:
2626
- (netbox_stable and netbox_stable_version | version_compare('2.1.5', '<=')) or (netbox_git and __netbox_git_contains_issue_1563_fix.rc == 1)
2727

28+
- name: Pin django-filter dependency to under 2.0.0 for NetBox 2.3.5 and below
29+
replace:
30+
path: "{{ netbox_current_path }}/requirements.txt"
31+
regexp: '^(django-filter>=\d+\.\d+(\.\d+)?)$'
32+
replace: '\1,<2.0.0'
33+
when:
34+
- (netbox_stable and netbox_stable_version | version_compare('2.3.5', '<=')) or (netbox_git and __netbox_git_contains_issue_2239_fix.rc == 1)
35+
2836
- name: Create NetBox virtualenv and install needed Python dependencies
2937
pip:
3038
requirements: "{{ netbox_current_path }}/requirements.txt"

tasks/install_via_git.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@
3737
changed_when: False
3838
failed_when: "__netbox_git_contains_issue_1563_fix.rc not in [0, 1]"
3939

40+
- name: Check existence of commit 1fb67b7, fixing issue netbox#2239
41+
shell: 'git log --format=%H "{{ netbox_git_version }}" | grep ^1fb67b791f1a91c624dae4a1cd256e4cf3ddbb77'
42+
args:
43+
chdir: "{{ netbox_git_repo_path }}"
44+
register: __netbox_git_contains_issue_2239_fix
45+
changed_when: False
46+
failed_when: "__netbox_git_contains_issue_2239_fix.rc not in [0, 1]"
47+
4048
- name: Archive and extract snapshot of git repository
4149
shell: 'git archive "{{ netbox_git_version }}" | tar -x -C "{{ netbox_git_deploy_path }}"'
4250
args:

0 commit comments

Comments
 (0)