Skip to content

Commit 65eca50

Browse files
committed
Rename webhooks Redis connection to tasks
Fixes #86
1 parent 1064342 commit 65eca50

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

tasks/install_via_git.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@
2424
changed_when: False
2525
failed_when: "_netbox_git_contains_issue_2239_fix.rc not in [0, 1]"
2626

27+
- name: Check existence of commit 3590ed3, renaming webhooks to tasks
28+
shell: 'set -o pipefail; git log --format=%H "{{ netbox_git_version }}" | grep ^3590ed378d161dd724fad2dc73ff56da746352f8'
29+
args:
30+
chdir: "{{ netbox_git_repo_path }}"
31+
executable: /bin/bash
32+
register: _netbox_git_contains_tasks_rename
33+
changed_when: False
34+
failed_when: "_netbox_git_contains_tasks_rename.rc not in [0, 1]"
35+
2736
- name: Archive and extract snapshot of git repository
2837
shell: 'set -o pipefail; git archive "{{ netbox_git_version }}" | tar -x -C "{{ netbox_git_deploy_path }}"'
2938
args:

templates/configuration.py.j2

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
{{ ansible_managed | comment }}
12
import json
23
import os
3-
{{ ansible_managed | comment }}
44

55
{% if netbox_metrics_enabled %}
66
if "prometheus_multiproc_dir" in os.environ:
@@ -30,7 +30,13 @@ DATABASE = {
3030
}
3131

3232
REDIS = {
33+
{# https://github.com/netbox-community/netbox/pull/4366 #}
34+
{% if netbox_stable and netbox_stable_version is version('2.7.11', '>=') or
35+
netbox_git and _netbox_git_contains_tasks_rename %}
36+
'tasks': {
37+
{% else %}
3338
'webhooks': {
39+
{% endif %}
3440
'HOST': '{{ netbox_redis_host }}',
3541
'PORT': {{ netbox_redis_port }},
3642
'PASSWORD': '{{ netbox_redis_password }}',

0 commit comments

Comments
 (0)