Skip to content

Commit e7f27e7

Browse files
authored
Merge pull request #843 from netbox-community/devel
Release 3.8.1
2 parents 86249f0 + 678bc02 commit e7f27e7

File tree

253 files changed

+5123
-13120
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

253 files changed

+5123
-13120
lines changed

.github/workflows/main.yml

Lines changed: 15 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -45,106 +45,82 @@ jobs:
4545
fail-fast: false
4646
matrix:
4747
include:
48-
- python-version: 3.8
49-
VERSION: "v2.11"
50-
INTEGRATION_TESTS: "v2.11"
51-
- python-version: 3.8
52-
VERSION: "v3.0"
53-
INTEGRATION_TESTS: "v3.0"
5448
- python-version: 3.8
5549
VERSION: "v3.1"
5650
INTEGRATION_TESTS: "v3.1"
5751
- python-version: 3.8
5852
VERSION: "v3.2"
5953
INTEGRATION_TESTS: "v3.2"
54+
- python-version: 3.8
55+
VERSION: "v3.3"
56+
INTEGRATION_TESTS: "v3.3"
6057
steps:
6158
- name: Checkout repo
6259
uses: actions/checkout@v2
6360
- name: Set up Python ${{ matrix.python-version }}
6461
uses: actions/setup-python@v2
6562
with:
6663
python-version: ${{ matrix.python-version }}
67-
if: matrix.VERSION == 'v2.11'
68-
- name: Clone & Start netbox-docker containers - 2.11
69-
env:
70-
VERSION: ${{ matrix.VERSION }}
71-
run: |
72-
cd ..
73-
git clone https://github.com/netbox-community/netbox-docker.git
74-
cd netbox-docker
75-
git checkout 1.2.0
76-
tee docker-compose.override.yml <<EOF
77-
version: '3.4'
78-
services:
79-
netbox:
80-
image: netboxcommunity/netbox:v2.11
81-
ports:
82-
- 32768:8080
83-
EOF
84-
docker-compose up -d --quiet-pull
85-
docker container ls
86-
cd ..
87-
if: matrix.VERSION == 'v2.11'
88-
- name: Clone & Start netbox-docker containers - 3.0
64+
- name: Clone & Start netbox-docker containers - 3.1
8965
env:
9066
VERSION: ${{ matrix.VERSION }}
9167
run: |
9268
cd ..
9369
git clone https://github.com/netbox-community/netbox-docker.git
9470
cd netbox-docker
95-
git checkout 1.3.1
71+
git checkout 1.4.1
9672
tee docker-compose.override.yml <<EOF
9773
version: '3.4'
9874
services:
9975
netbox:
100-
image: netboxcommunity/netbox:v3.0
76+
image: netboxcommunity/netbox:v3.1
10177
ports:
10278
- 32768:8080
10379
EOF
10480
docker-compose up -d --quiet-pull
10581
docker container ls
10682
cd ..
107-
if: matrix.VERSION == 'v3.0'
108-
- name: Clone & Start netbox-docker containers - 3.1
83+
if: matrix.VERSION == 'v3.1'
84+
- name: Clone & Start netbox-docker containers - 3.2
10985
env:
11086
VERSION: ${{ matrix.VERSION }}
11187
run: |
11288
cd ..
11389
git clone https://github.com/netbox-community/netbox-docker.git
11490
cd netbox-docker
115-
git checkout 1.4.1
91+
git checkout 1.6.1
11692
tee docker-compose.override.yml <<EOF
11793
version: '3.4'
11894
services:
11995
netbox:
120-
image: netboxcommunity/netbox:v3.1
96+
image: netboxcommunity/netbox:v3.2
12197
ports:
12298
- 32768:8080
12399
EOF
124100
docker-compose up -d --quiet-pull
125101
docker container ls
126102
cd ..
127-
if: matrix.VERSION == 'v3.1'
128-
- name: Clone & Start netbox-docker containers - 3.2
103+
if: matrix.VERSION == 'v3.2'
104+
- name: Clone & Start netbox-docker containers - 3.3
129105
env:
130106
VERSION: ${{ matrix.VERSION }}
131107
run: |
132108
cd ..
133109
git clone https://github.com/netbox-community/netbox-docker.git
134110
cd netbox-docker
135-
git checkout 1.6.1
111+
git checkout 2.2.0
136112
tee docker-compose.override.yml <<EOF
137113
version: '3.4'
138114
services:
139115
netbox:
140-
image: netboxcommunity/netbox:v3.2
116+
image: netboxcommunity/netbox:v3.3
141117
ports:
142118
- 32768:8080
143119
EOF
144120
docker-compose up -d --quiet-pull
145121
docker container ls
146122
cd ..
147-
if: matrix.VERSION == 'v3.2'
123+
if: matrix.VERSION == 'v3.3'
148124
- name: Install and configure Poetry
149125
uses: snok/install-poetry@v1.1.1
150126
with:

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ version: 2
33
# configuration: docs/conf.py
44

55
python:
6-
version: 3.6
6+
version: 3.8
77
install:
88
- requirements: docs/requirements.txt

CHANGELOG.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,19 @@ NetBox.NetBox Release Notes
55
.. contents:: Topics
66

77

8+
v3.8.1
9+
======
10+
11+
Minor Changes
12+
-------------
13+
14+
- nb_inventory - Allow for jinja templating [#834](https://github.com/netbox-community/ansible_modules/pull/834)
15+
16+
Bugfixes
17+
--------
18+
19+
- Fix idempotency with custom_fields [#839](https://github.com/netbox-community/ansible_modules/pull/839)
20+
821
v3.8.0
922
======
1023

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ To keep the code simple, we only officially support the two latest releases of N
1414
- NetBox 2.11+ or the two latest NetBox releases
1515
- Python 3.8+
1616
- Python modules:
17+
- `pytz`
1718
- `pynetbox 5.0.4+`, `pynetbox 6.4.0+` if using 3.1 features
1819
- `packaging` if using Ansible < 2.10, as it's included in Ansible 2.10+
1920
- Ansible 2.10+

changelogs/changelog.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,3 +706,13 @@ releases:
706706
- netbox_cable - Change length to float from int [#828](https://github.com/netbox-community/ansible_modules/pull/828)
707707
- netbox_location - Add tenant to module [#829](https://github.com/netbox-community/ansible_modules/pull/829)
708708
release_date: '2022-09-19'
709+
3.8.1:
710+
changes:
711+
bugfixes:
712+
- Fix idempotency with custom_fields [#839](https://github.com/netbox-community/ansible_modules/pull/839)
713+
minor_changes:
714+
- nb_inventory - Allow for jinja templating [#834](https://github.com/netbox-community/ansible_modules/pull/834)
715+
trivial:
716+
- Update CI to include NetBox 3.3 [#841](https://github.com/netbox-community/ansible_modules/pull/841)
717+
- Update documentation to show exclusion filter [#837](https://github.com/netbox-community/ansible_modules/pull/837)
718+
release_date: '2022-10-17'

changelogs/fragments/allow-jinja2.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
minor_changes:
3+
- nb_inventory - Allow Jinja2 template on filter

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
author = "Mikhail Yohman <@FragmentedPacket>"
2828

2929
# The full version, including alpha/beta/rc tags
30-
release = "3.8.0"
30+
release = "3.8.1"
3131

3232

3333
# -- General configuration ---------------------------------------------------

docs/plugins/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Netbox.Netbox
77
=============
88

9-
Collection version 3.8.0
9+
Collection version 3.8.1
1010

1111
.. contents::
1212
:local:

docs/plugins/nb_inventory_inventory.rst

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ netbox.netbox.nb_inventory inventory -- NetBox inventory source
4343
.. Collection note
4444
4545
.. note::
46-
This inventory plugin is part of the `netbox.netbox collection <https://galaxy.ansible.com/netbox/netbox>`_ (version 3.8.0).
46+
This inventory plugin is part of the `netbox.netbox collection <https://galaxy.ansible.com/netbox/netbox>`_ (version 3.8.1).
4747

4848
To install it, use: :code:`ansible-galaxy collection install netbox.netbox`.
4949

@@ -710,7 +710,9 @@ Parameters
710710

711711
<div class="ansible-option-cell">
712712

713-
List of parameters passed to the query string for devices (Multiple values may be separated by commas)
713+
List of parameters passed to the query string for devices (Multiple values may be separated by commas).
714+
715+
You can also use Jinja2 templates.
714716

715717

716718
.. rst-class:: ansible-option-line
@@ -1086,6 +1088,8 @@ Parameters
10861088
- :ansible-option-choices-entry:`is\_virtual`
10871089
- :ansible-option-choices-entry:`services`
10881090
- :ansible-option-choices-entry:`status`
1091+
- :ansible-option-choices-entry:`time\_zone`
1092+
- :ansible-option-choices-entry:`utc\_offset`
10891093

10901094
.. rst-class:: ansible-option-line
10911095

@@ -1836,7 +1840,9 @@ Parameters
18361840

18371841
<div class="ansible-option-cell">
18381842

1839-
List of parameters passed to the query string for both devices and VMs (Multiple values may be separated by commas)
1843+
List of parameters passed to the query string for both devices and VMs (Multiple values may be separated by commas).
1844+
1845+
You can also use Jinja2 templates.
18401846

18411847

18421848
.. rst-class:: ansible-option-line
@@ -2307,7 +2313,9 @@ Parameters
23072313

23082314
<div class="ansible-option-cell">
23092315

2310-
List of parameters passed to the query string for VMs (Multiple values may be separated by commas)
2316+
List of parameters passed to the query string for VMs (Multiple values may be separated by commas).
2317+
2318+
You can also use Jinja2 templates.
23112319

23122320

23132321
.. rst-class:: ansible-option-line
@@ -2349,8 +2357,11 @@ Examples
23492357
- role: network-edge-router
23502358
device_query_filters:
23512359
- has_primary_ip: 'true'
2360+
- tenant__n: internal
23522361

23532362
# has_primary_ip is a useful way to filter out patch panels and other passive devices
2363+
# Adding '__n' to a field searches for the negation of the value.
2364+
# The above searches for devices that are NOT "tenant = internal"
23542365

23552366
# Query filters are passed directly as an argument to the fetching queries.
23562367
# You can repeat tags in the query string.
@@ -2406,6 +2417,32 @@ Examples
24062417
NETBOX_API: '{{ NETBOX_API }}'
24072418
NETBOX_TOKEN: '{{ NETBOX_TOKEN }}'
24082419

2420+
# Example of time_zone and utc_offset usage
2421+
2422+
plugin: netbox.netbox.nb_inventory
2423+
api_endpoint: http://localhost:8000
2424+
token: <insert token>
2425+
validate_certs: True
2426+
config_context: True
2427+
group_by:
2428+
- site
2429+
- role
2430+
- time_zone
2431+
- utc_offset
2432+
device_query_filters:
2433+
- has_primary_ip: 'true'
2434+
- manufacturer_id: 1
2435+
2436+
# using group by time_zone, utc_offset it will group devices in ansible groups depending on time zone configured on site.
2437+
# time_zone gives grouping like:
2438+
# - "time_zone_Europe_Bucharest"
2439+
# - "time_zone_Europe_Copenhagen"
2440+
# - "time_zone_America_Denver"
2441+
# utc_offset gives grouping like:
2442+
# - "time_zone_utc_minus_7"
2443+
# - "time_zone_utc_plus_1"
2444+
# - "time_zone_utc_plus_10"
2445+
24092446

24102447

24112448

docs/plugins/nb_lookup_lookup.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ netbox.netbox.nb_lookup lookup -- Queries and returns elements from NetBox
4343
.. Collection note
4444
4545
.. note::
46-
This lookup plugin is part of the `netbox.netbox collection <https://galaxy.ansible.com/netbox/netbox>`_ (version 3.8.0).
46+
This lookup plugin is part of the `netbox.netbox collection <https://galaxy.ansible.com/netbox/netbox>`_ (version 3.8.1).
4747

4848
To install it, use: :code:`ansible-galaxy collection install netbox.netbox`.
4949
You need further requirements to be able to use this lookup plugin,

docs/plugins/netbox_aggregate_module.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ netbox.netbox.netbox_aggregate module -- Creates or removes aggregates from NetB
4343
.. Collection note
4444
4545
.. note::
46-
This module is part of the `netbox.netbox collection <https://galaxy.ansible.com/netbox/netbox>`_ (version 3.8.0).
46+
This module is part of the `netbox.netbox collection <https://galaxy.ansible.com/netbox/netbox>`_ (version 3.8.1).
4747

4848
To install it, use: :code:`ansible-galaxy collection install netbox.netbox`.
4949
You need further requirements to be able to use this module,

docs/plugins/netbox_cable_module.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ netbox.netbox.netbox_cable module -- Create, update or delete cables within NetB
4343
.. Collection note
4444
4545
.. note::
46-
This module is part of the `netbox.netbox collection <https://galaxy.ansible.com/netbox/netbox>`_ (version 3.8.0).
46+
This module is part of the `netbox.netbox collection <https://galaxy.ansible.com/netbox/netbox>`_ (version 3.8.1).
4747

4848
To install it, use: :code:`ansible-galaxy collection install netbox.netbox`.
4949
You need further requirements to be able to use this module,

docs/plugins/netbox_circuit_module.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ netbox.netbox.netbox_circuit module -- Create, update or delete circuits within
4343
.. Collection note
4444
4545
.. note::
46-
This module is part of the `netbox.netbox collection <https://galaxy.ansible.com/netbox/netbox>`_ (version 3.8.0).
46+
This module is part of the `netbox.netbox collection <https://galaxy.ansible.com/netbox/netbox>`_ (version 3.8.1).
4747

4848
To install it, use: :code:`ansible-galaxy collection install netbox.netbox`.
4949
You need further requirements to be able to use this module,

docs/plugins/netbox_circuit_termination_module.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ netbox.netbox.netbox_circuit_termination module -- Create, update or delete circ
4343
.. Collection note
4444
4545
.. note::
46-
This module is part of the `netbox.netbox collection <https://galaxy.ansible.com/netbox/netbox>`_ (version 3.8.0).
46+
This module is part of the `netbox.netbox collection <https://galaxy.ansible.com/netbox/netbox>`_ (version 3.8.1).
4747

4848
To install it, use: :code:`ansible-galaxy collection install netbox.netbox`.
4949
You need further requirements to be able to use this module,

docs/plugins/netbox_circuit_type_module.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ netbox.netbox.netbox_circuit_type module -- Create, update or delete circuit typ
4343
.. Collection note
4444
4545
.. note::
46-
This module is part of the `netbox.netbox collection <https://galaxy.ansible.com/netbox/netbox>`_ (version 3.8.0).
46+
This module is part of the `netbox.netbox collection <https://galaxy.ansible.com/netbox/netbox>`_ (version 3.8.1).
4747

4848
To install it, use: :code:`ansible-galaxy collection install netbox.netbox`.
4949
You need further requirements to be able to use this module,

docs/plugins/netbox_cluster_group_module.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ netbox.netbox.netbox_cluster_group module -- Create, update or delete cluster gr
4343
.. Collection note
4444
4545
.. note::
46-
This module is part of the `netbox.netbox collection <https://galaxy.ansible.com/netbox/netbox>`_ (version 3.8.0).
46+
This module is part of the `netbox.netbox collection <https://galaxy.ansible.com/netbox/netbox>`_ (version 3.8.1).
4747

4848
To install it, use: :code:`ansible-galaxy collection install netbox.netbox`.
4949
You need further requirements to be able to use this module,

docs/plugins/netbox_cluster_module.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ netbox.netbox.netbox_cluster module -- Create, update or delete clusters within
4343
.. Collection note
4444
4545
.. note::
46-
This module is part of the `netbox.netbox collection <https://galaxy.ansible.com/netbox/netbox>`_ (version 3.8.0).
46+
This module is part of the `netbox.netbox collection <https://galaxy.ansible.com/netbox/netbox>`_ (version 3.8.1).
4747

4848
To install it, use: :code:`ansible-galaxy collection install netbox.netbox`.
4949
You need further requirements to be able to use this module,

docs/plugins/netbox_cluster_type_module.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ netbox.netbox.netbox_cluster_type module -- Create, update or delete cluster typ
4343
.. Collection note
4444
4545
.. note::
46-
This module is part of the `netbox.netbox collection <https://galaxy.ansible.com/netbox/netbox>`_ (version 3.8.0).
46+
This module is part of the `netbox.netbox collection <https://galaxy.ansible.com/netbox/netbox>`_ (version 3.8.1).
4747

4848
To install it, use: :code:`ansible-galaxy collection install netbox.netbox`.
4949
You need further requirements to be able to use this module,

docs/plugins/netbox_config_context_module.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ netbox.netbox.netbox_config_context module -- Creates, updates or deletes config
4343
.. Collection note
4444
4545
.. note::
46-
This module is part of the `netbox.netbox collection <https://galaxy.ansible.com/netbox/netbox>`_ (version 3.8.0).
46+
This module is part of the `netbox.netbox collection <https://galaxy.ansible.com/netbox/netbox>`_ (version 3.8.1).
4747

4848
To install it, use: :code:`ansible-galaxy collection install netbox.netbox`.
4949
You need further requirements to be able to use this module,

docs/plugins/netbox_console_port_module.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ netbox.netbox.netbox_console_port module -- Create, update or delete console por
4343
.. Collection note
4444
4545
.. note::
46-
This module is part of the `netbox.netbox collection <https://galaxy.ansible.com/netbox/netbox>`_ (version 3.8.0).
46+
This module is part of the `netbox.netbox collection <https://galaxy.ansible.com/netbox/netbox>`_ (version 3.8.1).
4747

4848
To install it, use: :code:`ansible-galaxy collection install netbox.netbox`.
4949
You need further requirements to be able to use this module,

docs/plugins/netbox_console_port_template_module.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ netbox.netbox.netbox_console_port_template module -- Create, update or delete co
4343
.. Collection note
4444
4545
.. note::
46-
This module is part of the `netbox.netbox collection <https://galaxy.ansible.com/netbox/netbox>`_ (version 3.8.0).
46+
This module is part of the `netbox.netbox collection <https://galaxy.ansible.com/netbox/netbox>`_ (version 3.8.1).
4747

4848
To install it, use: :code:`ansible-galaxy collection install netbox.netbox`.
4949
You need further requirements to be able to use this module,

0 commit comments

Comments
 (0)