Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
135 commits
Select commit Hold shift + click to select a range
9915b96
Remove 404 link (#1392)
jpmens Mar 30, 2025
df09c94
fix: Add prefixes to site for NetBox >=4.2 (#1393)
jadyndev Mar 30, 2025
cd0b654
Updated netbox_circuit_termination.py to support NetBox 4.2.x (#1402)
nsthompson Mar 30, 2025
973aeb1
add base_url to api endpoint to allow non-root context nextbox endpoints
lanefu Apr 13, 2025
9f3ee0d
Fixed syntax error
Kloppi313 May 9, 2025
8c87105
Merge pull request #1414 from Kloppi313/patch-1
sc68cal May 10, 2025
11e4dd2
Merge pull request #1407 from lanefu/latest-with-inventory-fix
sc68cal May 11, 2025
41a6aaa
Support of object types for netbox_tag module (#1415)
yodzeb May 20, 2025
60bb038
Add NetBox 4.3 to CI matrix (#1417)
rodvand May 20, 2025
b773c80
fix: nb_lookup plugin: Allow mac-addresses lookup (#1416)
shaderecker May 23, 2025
3a96d06
Bump jinja2 from 3.1.5 to 3.1.6 (#1418)
dependabot[bot] May 23, 2025
9f70d89
Support for related_object_filter in the netbox_custom_field module
Jun 6, 2025
72578a6
Extra inline usage info
Jun 6, 2025
95fec4e
fixes #1426 : broken netbox_service module
Jun 12, 2025
7c3c96d
fixes #1426 : changelog fragment
Jun 12, 2025
f771c08
fix lint error in CI
Jun 12, 2025
62bf601
Update changelogs/fragments/netbox_service.yml
yodzeb Jun 13, 2025
6e91156
Merge pull request #1427 from yodzeb/fix_1426
sc68cal Jun 17, 2025
ffd1050
Merge pull request #1423 from yodzeb/netbox_custom_field-related_obje…
sc68cal Jun 17, 2025
3d21fa0
Bump urllib3 from 2.3.0 to 2.5.0
dependabot[bot] Jun 19, 2025
f57ef66
Merge pull request #1431 from netbox-community/dependabot/pip/urllib3…
sc68cal Jun 19, 2025
37e30e3
Bump requests from 2.32.3 to 2.32.4 (#1425)
dependabot[bot] Jun 30, 2025
19476e7
Fix Duplicate task name
benoit-ferre Jul 1, 2025
6568048
Add changelog
benoit-ferre Jul 1, 2025
4443088
Fix changelog file
benoit-ferre Jul 1, 2025
d94dac7
Remove trailing space in changelog
benoit-ferre Jul 1, 2025
77e28f8
Merge pull request #1435 from benoit-ferre/fix-lint
sc68cal Jul 4, 2025
a514ff7
Add first iteration fix -> Update once checked with code owner!
StoffelCPR Jul 7, 2025
310665e
Code cleanup and optimization.
StoffelCPR Jul 8, 2025
e41da76
Code linting fix
StoffelCPR Jul 8, 2025
f4fe55c
Adding debug print to false green tests
StoffelCPR Jul 8, 2025
869d61b
turn DeepDiff object into standard dict to enable serialization
StoffelCPR Jul 8, 2025
2ae9fda
Using DeepDiff native to_json()
StoffelCPR Jul 8, 2025
7b325e0
Linting fixes...
StoffelCPR Jul 8, 2025
c707644
enabling json output during inventory tests
StoffelCPR Jul 8, 2025
a5495ec
Adding collected inventory to debug output to easier incorporate changes
StoffelCPR Jul 8, 2025
d14c87d
Updating code to be backwards compatible
StoffelCPR Jul 9, 2025
841e00d
Removing debug output from tests
StoffelCPR Jul 9, 2025
7419bc0
Linting fixes
StoffelCPR Jul 9, 2025
becc534
Fix sevral integration tests failure (#1439)
benoit-ferre Aug 12, 2025
12f40f9
Add support for custom headers in all Netbox modules (#1433)
benoit-ferre Aug 12, 2025
ce2f7cb
Bump aiohttp from 3.11.11 to 3.12.14 (#1442)
dependabot[bot] Aug 12, 2025
a7d57cc
Remove useless NB_CONFIG constant
dchiquito Aug 23, 2025
a8571e8
Clarify netbox_users.py data flow a bit
dchiquito Aug 23, 2025
cdd59dc
Treat permissions, groups, actions, and object types as sets
dchiquito Aug 23, 2025
7b3a6dd
New permission tests
dchiquito Aug 23, 2025
f09cbc8
New user tests
dchiquito Aug 23, 2025
9b7e055
New user group tests
dchiquito Aug 23, 2025
2c3c513
Add numerals to all test passwords
dchiquito Aug 23, 2025
2976916
Use explicit ID in user group test
dchiquito Aug 23, 2025
d46f660
Use explicit ID in permission tests
dchiquito Aug 24, 2025
0b8c442
Use explicit ID in token tests
dchiquito Aug 24, 2025
b8e70d2
Merge branch 'netbox-community:devel' into devel
StoffelCPR Aug 25, 2025
c13f3db
Add module_utils/netbox_core.py
dchiquito Sep 1, 2025
9b5ff08
Add netbox_data_source module
dchiquito Sep 1, 2025
468287d
Data source CRUD tests
dchiquito Sep 1, 2025
e9e87e1
Remove debugging step from data source tests
dchiquito Sep 1, 2025
0c08746
Fix tox errors
dchiquito Sep 1, 2025
0e65a65
Add changelog fragment
dchiquito Sep 2, 2025
a9aafef
Fix changelog formatting
dchiquito Sep 2, 2025
3a040c7
Relint changelog
dchiquito Sep 2, 2025
04b4b44
Merge pull request #1438 from StoffelCPR/devel
sc68cal Sep 5, 2025
17963cc
Fix lints in changelog
dchiquito Sep 8, 2025
d098120
Merge branch 'devel' into users-ordering
dchiquito Sep 8, 2025
b719669
Fix ansible-bad-import-from pylint errors (#1462)
sc68cal Sep 13, 2025
d3880fc
Allow dict parameters for primary_mac_address
gs-adn Sep 12, 2025
f9963c4
docs: Small typo + hyperlink on advanced.rst
aj2s Sep 17, 2025
88adb24
Add changelog fragment for MR
gs-adn Sep 19, 2025
8f8bbdf
Add integration tests for adding mac address by id
gs-adn Sep 19, 2025
7030c5a
Merge pull request #1467 from aj2s/devel
sc68cal Sep 21, 2025
db81041
Fix #1469 - the old api code path didnt get the variable defined that…
Oct 1, 2025
5812a53
changlog fragment for fix of #1469
Oct 1, 2025
90aea32
Merge pull request #1470 from adp/fix_1469_old_apis
sc68cal Oct 6, 2025
d523efa
Merge pull request #1464 from gs-adn/fix-duplicate-macs-lookup
sc68cal Oct 13, 2025
db9e226
Bump deepdiff from 8.1.1 to 8.6.1
dependabot[bot] Oct 28, 2025
8ca870e
Merge pull request #1460 from netbox-community/dependabot/pip/deepdif…
sc68cal Oct 28, 2025
b44563e
Add contact assignment module
dchiquito Oct 29, 2025
7807cac
Add contact assignment tests
dchiquito Oct 29, 2025
bdfeddf
Add link to contact assignment documentation
dchiquito Oct 29, 2025
5fd37b8
Fix netbox_contact_assignment.py DOCUMENTATION yaml linting
dchiquito Oct 29, 2025
81e4bb3
Remove trailing space from netbox_contact_assignment.yml
dchiquito Oct 29, 2025
583f560
Fix power panel integration test
dchiquito Oct 30, 2025
66f893a
Fix power port integration test
dchiquito Oct 30, 2025
7431aa2
Fix power outlet integration test
dchiquito Oct 30, 2025
a7066c9
Fix virtual chassis integration test
dchiquito Oct 30, 2025
9008d60
Finish fixing virtual chassis integration test
dchiquito Oct 30, 2025
affbb42
Finish fixing virtual chassis integration test again
dchiquito Oct 30, 2025
099f603
Fix lookup integration test
dchiquito Oct 30, 2025
2f9dbb1
Rename `contact.contact_group` to `contact_groups`
dchiquito Oct 31, 2025
4b746a7
Add test for assigning contact to contact group
dchiquito Oct 31, 2025
a533c65
Add integration test for contact groups
dchiquito Oct 31, 2025
0e9a695
Fix yamllint
dchiquito Oct 31, 2025
20c8155
Add changelog fragment
dchiquito Oct 31, 2025
98efb96
Merge branch 'devel' into users-ordering
dchiquito Oct 31, 2025
962390b
Add changelog fragment
dchiquito Oct 31, 2025
1fa4bc8
Merge branch 'devel' into datasources
dchiquito Oct 31, 2025
3faf1b3
Set up data source integration tests correctly
dchiquito Oct 31, 2025
368a8cc
Add changelog fragment
dchiquito Oct 31, 2025
2577217
Fix flaky permission integration test
dchiquito Oct 31, 2025
1f43926
Merge pull request #1459 from dchiquito/datasources
sc68cal Nov 3, 2025
2e25e1f
Merge pull request #1480 from dchiquito/contacts
sc68cal Nov 3, 2025
9f8b227
Apply fix to all versions
dchiquito Nov 11, 2025
3275ede
Add netbox_contact.contact_group for older Netbox versions
dchiquito Nov 11, 2025
6155193
Check that contact_group/contact_groups are used correctly
dchiquito Nov 11, 2025
65dd52e
Add netbox_contact.contact_group tests for all versions
dchiquito Nov 11, 2025
d51ca35
Add netbox_contact_group tests for all versions
dchiquito Nov 11, 2025
09653b9
Merge branch 'devel' into 1182-fix-contact-groups
dchiquito Nov 11, 2025
64b47b4
Use _version_check_greater instead of string comparison
dchiquito Nov 11, 2025
b62a510
Fix bad-return-value-key lint in netbox_virtual_machine.py
dchiquito Nov 11, 2025
d368f87
Merge pull request #1456 from dchiquito/users-ordering
sc68cal Nov 13, 2025
001d241
Merge pull request #1481 from dchiquito/1182-fix-contact-groups
sc68cal Nov 13, 2025
757cecd
add yamllint and fix errors
cernymi Nov 5, 2025
48d2d15
Merge pull request #1490 from cernymi/cernymi/yamllint
sc68cal Nov 17, 2025
f5cc367
add _version_sanitize function to netbox_utils
cernymi Nov 7, 2025
1e2bdc3
improve _version_check_greater to be more universal in netbox_utils
cernymi Nov 5, 2025
22143dc
Merge pull request #1491 from cernymi/cernymi/netbox_versions
sc68cal Nov 18, 2025
3c504af
allow query params parent_object* for services in netbox_utils
cernymi Nov 6, 2025
56a65f8
Merge pull request #1484 from cernymi/cernymi/fix-issue-1479
sc68cal Nov 18, 2025
43542cb
plugins/module_utils: rename variable version to api_version
cernymi Nov 18, 2025
86f2b7f
plugins/module_utils: rename variable full_version to netbox_version
cernymi Nov 18, 2025
db5086d
Merge pull request #1493 from cernymi/cernymi/api_verson
sc68cal Nov 25, 2025
2df047c
Run pipeline lint with all supported python versions
cernymi Dec 2, 2025
8125f92
Bump urllib3 from 2.5.0 to 2.6.0
dependabot[bot] Dec 6, 2025
e70b63f
Merge pull request #1495 from cernymi/cernymi/python_for_tests
sc68cal Dec 8, 2025
d32fa03
Merge pull request #1497 from netbox-community/dependabot/pip/urllib3…
sc68cal Dec 8, 2025
8a53d0e
Bump python version and add trap for local-test.sh
cernymi Nov 30, 2025
e70e1e8
Remove old fixtures choices in unit tests
cernymi Nov 29, 2025
07339b8
Rewrite load test data function in unit tests
cernymi Nov 29, 2025
06ea34d
Move unit module_utils tests to netbox_utils folder
cernymi Nov 29, 2025
a87c45b
Rename unit test data.json files to file_name.json
cernymi Dec 1, 2025
1850d54
ci: Fix release workflow running too often
jplitza Dec 15, 2025
dbcd9ee
Merge pull request #1498 from cernymi/cernymi/unit_tests_data
sc68cal Dec 16, 2025
6b9cc00
Merge pull request #1500 from jplitza/fix-ci
sc68cal Dec 16, 2025
fc71cd2
Release v3.22.0
sc68cal Dec 27, 2025
594591e
Merge pull request #1503 from netbox-community/release_3_22_0
sc68cal Dec 31, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ body:
Describe in detail the exact steps that someone else can take to
reproduce this bug using the current stable release of the Ansible NetBox collection.
Include any sanatized playbooks, variables, & tasks specifically showing just the issue.
#placeholder: |
# placeholder: |

validations:
required: true
Expand Down
27 changes: 17 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,20 @@ jobs:
- name: Run black
uses: psf/black@stable

- name: Run yamllint
uses: ibiqlik/action-yamllint@v3
with:
file_or_dir: .
config_file: .yamllint.yml
strict: true

unit_testing:
runs-on: ubuntu-24.04
needs: linting
strategy:
fail-fast: false
matrix:
python-version: ["3.13"]
python-version: ["3.11", "3.12", "3.13"]

steps:

Expand Down Expand Up @@ -66,13 +73,13 @@ jobs:
strategy:
fail-fast: false
matrix:
include:
- VERSION: "v4.0"
NETBOX_DOCKER_VERSION: 2.9.1
include:
- VERSION: "v4.1"
NETBOX_DOCKER_VERSION: 3.0.1
- VERSION: "v4.2"
NETBOX_DOCKER_VERSION: 3.1.0
NETBOX_DOCKER_VERSION: 3.2.1
- VERSION: "v4.3"
NETBOX_DOCKER_VERSION: 3.3.0

steps:

Expand Down Expand Up @@ -114,7 +121,7 @@ jobs:
docker container ls
docker logs netbox-docker-netbox-1
timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:32768/login/)" != "200" ]]; do echo "waiting for NetBox"; sleep 5; done' || false
working-directory: /home/runner/.ansible/collections/ansible_collections/netbox/netbox
working-directory: /home/runner/.ansible/collections/ansible_collections/netbox/netbox

- name: Pre-populate NetBox
run: ./tests/integration/netbox-deploy.py
Expand All @@ -126,13 +133,13 @@ jobs:
ansible-test integration -v --color --coverage --python ${{ env.python-version }} inventory-${{ matrix.VERSION }}
working-directory: /home/runner/.ansible/collections/ansible_collections/netbox/netbox

- name: Run regression tests
- name: Run regression tests
continue-on-error: true
run: |
ansible-test integration -v --color --coverage --python ${{ env.python-version }} regression-${{ matrix.VERSION }}
run: |
ansible-test integration -v --color --coverage --python ${{ env.python-version }} regression-${{ matrix.VERSION }}
working-directory: /home/runner/.ansible/collections/ansible_collections/netbox/netbox

- name: Run integration tests
- name: Run integration tests
run: |
ansible-test integration -v --color --coverage --python ${{ env.python-version }} ${{ matrix.VERSION }}
ansible-test coverage report --all --omit "tests/*,hacking/*,docs/*" --show-missing
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Deploy collection to Ansible Galaxy
on:
create:
push:
tags:
- "v*"
jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ jobs:
'${{ needs.unit-galaxy.result }}',
'${{ needs.unit-source.result }}',
'${{ needs.ansible-lint.result }}'
])"
])"
52 changes: 52 additions & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
extends: default

# see rules at https://yamllint.readthedocs.io/en/latest/rules.html
ignore: |
- .cache/
- .venv/
- .github/

rules:
braces:
max-spaces-inside: 20
level: error
brackets:
max-spaces-inside: 20
level: error
colons:
max-spaces-before: 1
max-spaces-after: 20
level: error
commas:
max-spaces-before: 50
min-spaces-after: 1
max-spaces-after: 20
level: error
comments:
min-spaces-from-content: 1
comments-indentation: disable
document-start:
present: true
empty-lines:
max: 3
level: error
hyphens:
level: error
indentation:
spaces: 2
indent-sequences: whatever
check-multi-line-strings: false
key-duplicates: enable
line-length:
max: 230
level: warning
allow-non-breakable-words: true
allow-non-breakable-inline-mappings: true
new-line-at-end-of-file: enable
new-lines:
type: unix
trailing-spaces: enable
truthy: disable
octal-values:
forbid-explicit-octal: true
46 changes: 46 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,52 @@ NetBox.NetBox Release Notes

.. contents:: Topics

v3.22.0
=======

Minor Changes
-------------

- Add integration tests for contact groups
- Add support for custom headers for all modules
- Change `netbox_contact.contact_group` to `contact_groups`
- Fix ansible-bad-import-from pylint errors
- Fix broken code path when using old api path on old netbox systems
- Make the unit-test data structures more flexible.
- Remove abandoned unit-test data.
- add workaround to _build_query_params for services and Netbox 4.3.0 - 4.4.3 (wrong parent_object_type data type)
- add yamllint to project pipeline.
- improve version_check_greater to be more universal
- netbox_circuit_termination - Add parameters termination_id and termination_type for NetBox 4.2+
- netbox_tag - Add support for object_types on tags
- rename variable full_version to netbox_version.
- rename variable version to api_version.
- sanitize netbox versions received from api
- test suite expanded to run on Python 3.11, 3.12, and 3.13.
- user.groups, user.permissions, user_group.permissions, permission.actions, and permission.object_types are now treated as unordered sets for update comparison purposes.

Bugfixes
--------

- Add netbox version check to support service creation for netbox version prior of 4.3
- Fix integration test for circuit termination, missing assignment
- Fix integration test for service
- Fix task duplicate task name in documentation that cause ansible-lint error
- Fix typos in tag integration tests.
- Support for related_object_filter when related_object_type is "object"
- Use dedicated function to check netbox version istead of self.full_version for rack.
- add parent_object_type and parent_object_id to services ALLOWED_QUERY_PARAMS
- nb_device_interface: Fix specifying primary_mac_address objects by id for disambiguation
- nb_inventory - Fix service collection for version greater than 4.3
- nb_inventory - Fixed empty inventory results when netbox server URL is a non-root path
- netbox_service - Fix issue 1426 - broken netbox_service module

New Modules
-----------

- netbox.netbox.netbox_contact_assignment - Manage contact assignments in NetBox
- netbox.netbox.netbox_data_source - Manage data sources in NetBox

v3.21.0
=======

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ This Ansible collection consists of a set of modules to define the intended netw

- You must be running one of the two most recent releases of NetBox
- A NetBox write-enabled API token when using modules or a read-only token for the `nb_lookup` and `nb_inventory` plugins.
- Python 3.10+
- Python 3.11+
- Python modules:
- pytz
- pynetbox
- Ansible 2.15+
- Ansible 2.18+

## Installation

Expand Down
66 changes: 66 additions & 0 deletions changelogs/changelog.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
ancestor: null
releases:
0.1.0:
Expand Down Expand Up @@ -851,6 +852,71 @@ releases:
name: netbox_mac_address
namespace: ''
release_date: '2025-03-04'
3.22.0:
changes:
minor_changes:
- Change `netbox_contact.contact_group` to `contact_groups`
- Add integration tests for contact groups
- Add support for custom headers for all modules
- Fix ansible-bad-import-from pylint errors
- Fix broken code path when using old api path on old netbox systems
- add workaround to _build_query_params for services and Netbox 4.3.0 - 4.4.3 (wrong parent_object_type data type)
- netbox_circuit_termination - Add parameters termination_id and termination_type for NetBox 4.2+
- netbox_tag - Add support for object_types on tags
- improve version_check_greater to be more universal
- sanitize netbox versions received from api
- test suite expanded to run on Python 3.11, 3.12, and 3.13.
- Make the unit-test data structures more flexible.
- Remove abandoned unit-test data.
- user.groups, user.permissions, user_group.permissions, permission.actions, and permission.object_types are now treated as unordered sets for update comparison purposes.
- rename variable version to api_version.
- rename variable full_version to netbox_version.
- add yamllint to project pipeline.
bugfixes:
- Fix task duplicate task name in documentation that cause ansible-lint error
- nb_inventory - Fix service collection for version greater than 4.3
- Add netbox version check to support service creation for netbox version prior of 4.3
- Use dedicated function to check netbox version istead of self.full_version for rack.
- Fix typos in tag integration tests.
- Fix integration test for circuit termination, missing assignment
- Fix integration test for service
- "nb_device_interface: Fix specifying primary_mac_address objects by id for disambiguation"
- add parent_object_type and parent_object_id to services ALLOWED_QUERY_PARAMS
- nb_inventory - Fixed empty inventory results when netbox server URL is a non-root path
- Support for related_object_filter when related_object_type is "object"
- netbox_service - Fix issue 1426 - broken netbox_service module
modules:
- description: Manage data sources in NetBox
name: netbox_data_source
namespace: ''
- description: Manage contact assignments in NetBox
name: netbox_contact_assignment
namespace: ''
fragments:
- 1182-fix-contact-groups.yml
- 1433-add-custom-headers.yml
- 1435-fix-duplicate-task-name.yml
- 1438-fix-inventory-service-collection.yml
- 1439-fix-sevral-bug-discovered-by-integration-tests.yml
- 1459-add-netbox-data-sources.yml
- 1462-fix-pylint-errors.yml
- 1464-fix-mac-lookup-by-id.yml
- 1469-fix-old-apis.yml
- 1479-fix-services_parent_object.yml
- contacts.yml
- nb_inventory.yml
- netbox_circuit_termination.yml
- netbox_custom_field.yml
- netbox_service.yml
- netbox_tag.yml
- netbox_version_check_greater.yml
- netbox_version_sanitize.yml
- python_versions.yml
- unit_test_data.yml
- users-ordering.yml
- version_api.yml
- version_netbox.yml
- yamllint.yml
3.3.0:
changes:
minor_changes:
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
author = "Mikhail Yohman <@FragmentedPacket>"

# The full version, including alpha/beta/rc tags
release = "3.21.0"
release = "3.22.0"


# -- General configuration ---------------------------------------------------
Expand Down
5 changes: 3 additions & 2 deletions docs/getting_started/contributing/modules/architecture.rst
Original file line number Diff line number Diff line change
Expand Up @@ -284,14 +284,15 @@ We set several instance attributes that are used within other methods throughout
url = self.module.params["netbox_url"]
token = self.module.params["netbox_token"]
ssl_verify = self.module.params["validate_certs"]
headers = self.module.params["headers"]

# Attempt to initiate connection to NetBox
if nb_client is None:
self.nb = self._connect_netbox_api(url, token, ssl_verify)
self.nb = self._connect_netbox_api(url, token, ssl_verify, headers)
else:
self.nb = nb_client
try:
self.version = self.nb.version
self.api_version = self.nb.version
except AttributeError:
self.module.fail_json(msg="Must have pynetbox >=4.1.0")

Expand Down
6 changes: 4 additions & 2 deletions docs/getting_started/how-to-use/advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ To make this possible, every module accepts the ``query_params`` argument. This
you want to use to search for the object.

Let's start with another example. We will continue to use :ref:`netbox.netbox.netbox_ip_address<ansible_collections.netbox.netbox.netbox_ip_address_module>`. We created **192.168.100.1/24** as a duplicate IP address within
the global IP address space within NetBox. This task should fail saying there was more than result returned.
the global IP address space within NetBox. This task should fail saying there was more than one result returned.

.. code-block:: yaml

Expand Down Expand Up @@ -304,7 +304,9 @@ Hopefully this shines some light on this useful feature to allow you, as the use
Using Module defaults groups
--------------------------------------------

Ansible-core >= 2.12 provide a useful feature called [Module defaults groups](https://docs.ansible.com/ansible/latest/user_guide/playbooks_module_defaults.html#module-defaults-groups) that lets us specify default parameters for a group of modules in a single place. We can use the action_group ``netbox`` that contains all modules from this collection to avoid setting e.g. ``token`` and ``url`` on each task and thus reduce boilerplate code.
Ansible-core >= 2.12 provide a useful feature called `Module defaults groups`_ that lets us specify default parameters for a group of modules in a single place. We can use the action_group ``netbox`` that contains all modules from this collection to avoid setting e.g. ``token`` and ``url`` on each task and thus reduce boilerplate code.

.. _Module defaults groups: https://docs.ansible.com/ansible/latest/user_guide/playbooks_module_defaults.html#module-defaults-groups

.. code-block:: yaml

Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/environment_variables.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:orphan:

.. meta::
:antsibull-docs: 2.13.1
:antsibull-docs: 2.16.2

.. _list_of_collection_env_vars:

Expand Down
8 changes: 6 additions & 2 deletions docs/plugins/index.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
.. meta::
:antsibull-docs: 2.13.1
:antsibull-docs: 2.16.2


.. _plugins_in_netbox.netbox:

Netbox.Netbox
=============

Collection version 3.21.0
Collection version 3.22.0

.. contents::
:local:
Expand Down Expand Up @@ -67,11 +67,13 @@ Modules
* :ansplugin:`netbox_console_server_port module <netbox.netbox.netbox_console_server_port#module>` -- Create, update or delete console server ports within NetBox
* :ansplugin:`netbox_console_server_port_template module <netbox.netbox.netbox_console_server_port_template#module>` -- Create, update or delete console server port templates within NetBox
* :ansplugin:`netbox_contact module <netbox.netbox.netbox_contact#module>` -- Creates or removes contacts from NetBox
* :ansplugin:`netbox_contact_assignment module <netbox.netbox.netbox_contact_assignment#module>` -- Creates or removes contact assignments from NetBox
* :ansplugin:`netbox_contact_group module <netbox.netbox.netbox_contact_group#module>` -- Creates or removes contact groups from NetBox
* :ansplugin:`netbox_contact_role module <netbox.netbox.netbox_contact_role#module>` -- Creates or removes contact roles from NetBox
* :ansplugin:`netbox_custom_field module <netbox.netbox.netbox_custom_field#module>` -- Creates, updates or deletes custom fields within NetBox
* :ansplugin:`netbox_custom_field_choice_set module <netbox.netbox.netbox_custom_field_choice_set#module>` -- Creates, updates or deletes custom field choice sets within Netbox
* :ansplugin:`netbox_custom_link module <netbox.netbox.netbox_custom_link#module>` -- Creates, updates or deletes custom links within NetBox
* :ansplugin:`netbox_data_source module <netbox.netbox.netbox_data_source#module>` -- Creates or removes data sources from NetBox
* :ansplugin:`netbox_device module <netbox.netbox.netbox_device#module>` -- Create, update or delete devices within NetBox
* :ansplugin:`netbox_device_bay module <netbox.netbox.netbox_device_bay#module>` -- Create, update or delete device bays within NetBox
* :ansplugin:`netbox_device_bay_template module <netbox.netbox.netbox_device_bay_template#module>` -- Create, update or delete device bay templates within NetBox
Expand Down Expand Up @@ -160,11 +162,13 @@ Modules
netbox_console_server_port_module
netbox_console_server_port_template_module
netbox_contact_module
netbox_contact_assignment_module
netbox_contact_group_module
netbox_contact_role_module
netbox_custom_field_module
netbox_custom_field_choice_set_module
netbox_custom_link_module
netbox_data_source_module
netbox_device_module
netbox_device_bay_module
netbox_device_bay_template_module
Expand Down
Loading
Loading