You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Resolves#1247, Resolves#1245: Added CI
* Resolves#1244: Update readme with minmimum Ansible version
* Resolves#1241: Drop obsolete Ansible and Python versions
* Fixes#1243: Add ansible-lint configuration
* Fixes#1243: Remove yamllint config in favour of ansible-lint
* Fixes#1247: Add requirements for CI pipeline
* Fixes#1247: Remove yamllint from old test suite
* Closes#1243: Test failures
* Closes#1247: Add a changelog
Copy file name to clipboardExpand all lines: README.md
+22-22
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,19 @@
1
-
# Ansible Modules for NetBox
1
+
# Ansible Modules for NetBox
2
2
3
3
## Description
4
-
The NetBox Ansible project provides an Ansible collection for interacting with NetBox, the leading solution for modeling and documenting modern networks. By combining the traditional disciplines of IP address management (IPAM) and datacenter infrastructure management (DCIM) with powerful APIs and extensions, NetBox provides the ideal "source of truth" to power network automation.
4
+
The NetBox Ansible project provides an Ansible collection for interacting with NetBox, the leading solution for modeling and documenting modern networks. By combining the traditional disciplines of IP address management (IPAM) and datacenter infrastructure management (DCIM) with powerful APIs and extensions, NetBox provides the ideal "source of truth" to power network automation.
5
5
6
-
This Ansible collection consists of a set of modules to define the intended network state in NetBox, along with plugins to drive automation of the network using data from NetBox.
6
+
This Ansible collection consists of a set of modules to define the intended network state in NetBox, along with plugins to drive automation of the network using data from NetBox.
7
7
8
8
## Requirements
9
9
10
10
- You must be running one of the two most recent releases of NetBox
11
-
- A NetBox write-enabled API token when using modules or a read-only token for the `nb_lookup ` and `nb_inventory` plugins.
12
-
- Python 3.8+
11
+
- A NetBox write-enabled API token when using modules or a read-only token for the `nb_lookup ` and `nb_inventory` plugins.
12
+
- Python 3.10+
13
13
- Python modules:
14
-
- pytz
15
-
- pynetbox
16
-
- Ansible 2.12+
14
+
- pytz
15
+
- pynetbox
16
+
- Ansible 2.15+
17
17
18
18
## Installation
19
19
@@ -41,10 +41,10 @@ To upgrade the collection to the latest available version, run the following com
You can also install a specific version of the collection, for example, if you need to downgrade when something is broken in the latest version (please report an issue in this repository). Use the following syntax to install version 3.17.0:
44
+
You can also install a specific version of the collection, for example, if you need to downgrade when something is broken in the latest version (please report an issue in this repository). Use the following syntax to install version 3.18.0:
See using [Ansible collections](https://docs.ansible.com/ansible/latest/user_guide/collections_using.html#installing-collections) for more details.
50
50
@@ -75,13 +75,13 @@ This is useful to test code within PRs.
75
75
## Use Cases
76
76
77
77
### Use Case 1 - Define Intended Network State in NetBox
78
-
Define the intended state of your network in NetBox, by interacting with the NetBox database to define objects and their associated state in the following ways:
78
+
Define the intended state of your network in NetBox, by interacting with the NetBox database to define objects and their associated state in the following ways:
79
79
80
80
- Make sure objects exit
81
81
- Update objects if they do exist
82
82
- Remove objects if they do not not exist
83
83
84
-
For example, to make sure a new aggregate network prefix exists:
84
+
For example, to make sure a new aggregate network prefix exists:
85
85
```
86
86
tasks:
87
87
- name: Create aggregate within NetBox with only required information
@@ -95,9 +95,9 @@ tasks:
95
95
```
96
96
97
97
### Use Case 2 - NetBox as a Dynamic Inventory Source for Ansible
98
-
Use the Inventory Plugin to dynamically generate Ansible inventory from device data in NetBox. Use query filters, groups and mappings to tailor the generated inventory to your specific needs.
98
+
Use the Inventory Plugin to dynamically generate Ansible inventory from device data in NetBox. Use query filters, groups and mappings to tailor the generated inventory to your specific needs.
99
99
100
-
The following example builds an Ansible inventory that groups devices by `role`, and filters for only devices that have the `network-edge-router` role, have a primary IP address and belong to the `internal` tenant:
100
+
The following example builds an Ansible inventory that groups devices by `role`, and filters for only devices that have the `network-edge-router` role, have a primary IP address and belong to the `internal` tenant:
101
101
```
102
102
# netbox_inventory.yml file in YAML format
103
103
# Example command line: ansible-inventory -v --list -i netbox_inventory.yml
@@ -116,9 +116,9 @@ device_query_filters:
116
116
```
117
117
118
118
### Use Case 3 - Query and Return Elements from NetBox
119
-
Use the Lookup plugin to query NetBox and return data to drive network automation, such as lists of devices, device configurations, prefixes and IP addresses etc.
119
+
Use the Lookup plugin to query NetBox and return data to drive network automation, such as lists of devices, device configurations, prefixes and IP addresses etc.
120
120
121
-
The following example returns a list of devices and their manufacturers, using an API filter to only return devices with the `management` role and the NetBox tag of `Dell`:
121
+
The following example returns a list of devices and their manufacturers, using an API filter to only return devices with the `management` role and the NetBox tag of `Dell`:
122
122
```
123
123
tasks:
124
124
# query a list of devices
@@ -134,13 +134,13 @@ tasks:
134
134
135
135
```
136
136
## Testing
137
-
Tested with Ansible Core v2.15.9. Ansible Core versions prior to 2.15.9 are not supported.
137
+
Tested with Ansible Core v2.15+ Ansible Core versions prior to 2.15 are not supported.
138
138
139
139
## Contributing
140
140
If you would to contribute to the project then you can find out how to get started [here](https://github.com/netbox-community/ansible_modules/blob/devel/CONTRIBUTING.md).
141
141
142
142
## Support
143
-
There are various options to get support for the collection:
143
+
There are various options to get support for the collection:
144
144
- Search through previous [GitHub Discussions](https://github.com/netbox-community/ansible_modules/discussions) or start a new one.
145
145
- Raise a [GitHub Issue](https://github.com/netbox-community/ansible_modules/issues)
146
146
- Read the module [documentation](https://netbox-ansible-collection.readthedocs.io/en/latest/)
@@ -149,11 +149,11 @@ There are various options to get support for the collection:
149
149
Customers of NetBox Labs and Ansible using the officially certified version of the collection can get support via the usual Ansible channels. Escalation to the NetBox Labs support team will be provided as needed.
150
150
151
151
## Release Notes
152
-
The collection release notes and changelog can be found [here](https://github.com/netbox-community/ansible_modules/releases).
152
+
The collection release notes and changelog can be found [here](https://github.com/netbox-community/ansible_modules/releases).
153
153
154
154
## Related Information
155
-
Some extra resources you might find useful for both the Anisble collection and for NetBox itself:
156
-
-[NetBox Zero to Hero](https://netboxlabs.com/zero-to-hero/) - free 12 part course that takes you from an empty NetBox through to a fully deployed branch site, using the Ansible collection extensively along the way.
155
+
Some extra resources you might find useful for both the Anisble collection and for NetBox itself:
156
+
-[NetBox Zero to Hero](https://netboxlabs.com/zero-to-hero/) - free 12 part course that takes you from an empty NetBox through to a fully deployed branch site, using the Ansible collection extensively along the way.
157
157
-[Network Configuration Assurance with NetBox and Ansible](https://netboxlabs.com/blog/network-configuration-assurance-with-netbox-and-ansible/) - blog post featuring the Inventory plugin being used in a simple network automation use case to compare actual network state Vs intended state as defined in NetBox.
158
158
- Official NetBox [documentation](https://docs.netbox.dev/en/stable/).
159
159
@@ -162,4 +162,4 @@ GNU General Public License v3.0 or later.
162
162
163
163
See [LICENSE](https://github.com/netbox-community/ansible_modules/blob/devel/LICENSE) for the full text of the license.
164
164
165
-
Link to the license that the collection is published under.
165
+
Link to the license that the collection is published under.
0 commit comments