diff --git a/.github/workflows/netbox.yml b/.github/workflows/netbox.yml index 3ba3e08..987a3aa 100644 --- a/.github/workflows/netbox.yml +++ b/.github/workflows/netbox.yml @@ -25,7 +25,7 @@ jobs: - ubuntu2004 - ubuntu2204 netbox: - - v3.4.4 + - v3.4.5 - v3.3.10 - v3.2.9 - v3.1.11 diff --git a/README.md b/README.md index 93db817..32dad9a 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Ansible Role: Netbox [![Netbox]( -https://img.shields.io/badge/Netbox-v3.4.4-blue)](https://github.com/netbox-community/netbox) +https://img.shields.io/badge/Netbox-v3.4.5-blue)](https://github.com/netbox-community/netbox) [![CI](https://github.com/jvoss/ansible-role-netbox/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/jvoss/ansible-role-netbox/actions/workflows/ci.yml) [![Netbox](https://github.com/jvoss/ansible-role-netbox/actions/workflows/netbox.yml/badge.svg)](https://github.com/jvoss/ansible-role-netbox/actions/workflows/netbox.yml) [![Ansible Galaxy](https://img.shields.io/badge/galaxy-jvoss.netbox-blue.svg)](https://galaxy.ansible.com/jvoss/netbox) diff --git a/defaults/main.yml b/defaults/main.yml index f7f1ca1..eb03190 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -371,6 +371,13 @@ netbox_rq_default_timeout: 300 # Note that the default value of this setting is derived from the installed location. # netbox_scripts_root: = '/opt/netbox/netbox/scripts' +# The maximum size (in bytes) that an upload will be before it gets streamed to the file system. +# Useful to be able to upload files bigger than 2.5Mbyte to custom scripts for processing. +# netbox_file_upload_max_memory_size: 2621440 + +# The name to use for the csrf token cookie. +# netbox_csrf_cookie_name: 'csrftoken' + # The name to use for the session cookie. netbox_session_cookie_name: 'sessionid' diff --git a/templates/configuration.py.j2 b/templates/configuration.py.j2 index 8a40e50..44cbad4 100644 --- a/templates/configuration.py.j2 +++ b/templates/configuration.py.j2 @@ -302,6 +302,14 @@ RQ_DEFAULT_TIMEOUT = {{ netbox_rq_default_timeout }} SCRIPTS_ROOT = {{ netbox_scripts_root }} {% endif %} +{% if netbox_file_upload_max_memory_size is defined %} +FILE_UPLOAD_MAX_MEMORY_SIZE = {{ netbox_file_upload_max_memory_size }} +{% endif %} + +{% if netbox_csrf_cookie_name is defined %} +CSRF_COOKIE_NAME = '{{ netbox_csrf_cookie_name }}' +{% endif %} + SESSION_COOKIE_NAME = '{{ netbox_session_cookie_name }}' {% if netbox_session_file_path == 'None' %}