Skip to content

Commit

Permalink
Merge pull request #420 from nautobot/develop
Browse files Browse the repository at this point in the history
Develop to main for v5.3.0 release
  • Loading branch information
joewesch authored Sep 12, 2024
2 parents dc73bbd + fa797c2 commit 55f3e4a
Show file tree
Hide file tree
Showing 183 changed files with 21,202 additions and 9,508 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ jobs:
INVOKE_NAUTOBOT_ANSIBLE_NAUTOBOT_VER: "${{ inputs.nautobot-version }}"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"
- name: "Set up Python"
uses: "actions/setup-python@v3"
uses: "actions/setup-python@v5"
with:
python-version: "${{ inputs.python-version }}"
- name: "Install invoke"
Expand Down
24 changes: 10 additions & 14 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: "${{ inputs.runs-on }}"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"
- name: "Install invoke"
run: "pip install -U pip && pip install invoke"
- name: "Linting"
Expand All @@ -30,14 +30,13 @@ jobs:
fail-fast: false
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
env:
INVOKE_NAUTOBOT_ANSIBLE_PYTHON_VER: "${{ matrix.python-version }}"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"
- name: "Install invoke"
run: "pip install -U pip && pip install invoke"
- name: "Tests"
Expand All @@ -52,14 +51,12 @@ jobs:
fail-fast: false
matrix:
python-version:
- "3.9"
- "3.11"
nautobot-version:
- "2.1"
# TODO: Change to 2.2 once it's released
# - "2.2"
- "2.3"
ansible-version:
- "2.14"
- "2.15"
- "2.16"
- "2.17"
with:
python-version: "${{ matrix.python-version }}"
nautobot-version: "${{ matrix.nautobot-version }}"
Expand All @@ -73,17 +70,16 @@ jobs:
fail-fast: false
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
nautobot-version:
- "2.0"
- "2.1"
# TODO: Enable 2.2 once it's released
# - "2.2"
- "2.2"
- "2.3"
ansible-version:
- "2.14"
- "2.15"
- "2.16"
- "2.17"
with:
python-version: "${{ matrix.python-version }}"
nautobot-version: "${{ matrix.nautobot-version }}"
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/trigger_manual.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: "Manual Tests"
on: # yamllint disable
workflow_dispatch:
inputs:
full-integration:
description: "Run full integration tests"
required: true
default: false
type: boolean

jobs:
tests:
uses: ./.github/workflows/tests.yml
with:
full-integration: "${{ inputs.full-integration }}"
2 changes: 1 addition & 1 deletion .github/workflows/trigger_pr_main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: "Pull Requests (main)"
concurrency: # Cancel any existing runs of this workflow for this same PR
group: "${{ '{{ github.workflow }}' }}-${{ '{{ github.ref }}' }}"
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
on: # yamllint disable
pull_request:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/trigger_pr_normal.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: "Pull Requests (normal)"
concurrency: # Cancel any existing runs of this workflow for this same PR
group: "${{ '{{ github.workflow }}' }}-${{ '{{ github.ref }}' }}"
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
on: # yamllint disable
pull_request:
Expand Down
26 changes: 12 additions & 14 deletions .github/workflows/trigger_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: "ubuntu-22.04"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"
- name: "Install invoke"
run: "pip install -U pip && pip install invoke"
- name: "Linting"
Expand All @@ -20,14 +20,13 @@ jobs:
fail-fast: false
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
env:
INVOKE_NAUTOBOT_ANSIBLE_PYTHON_VER: "${{ matrix.python-version }}"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"
- name: "Install invoke"
run: "pip install -U pip && pip install invoke"
- name: "Tests"
Expand All @@ -40,17 +39,16 @@ jobs:
fail-fast: false
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
nautobot-version:
- "2.0"
- "2.1"
# TODO: Enable 2.2 once it's released
# - "2.2"
- "2.2"
- "2.3"
ansible-version:
- "2.14"
- "2.15"
- "2.16"
- "2.17"
with:
python-version: "${{ matrix.python-version }}"
nautobot-version: "${{ matrix.nautobot-version }}"
Expand All @@ -63,11 +61,11 @@ jobs:
if: "startsWith(github.ref, 'refs/tags/v')"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"
- name: "Set up Python"
uses: "actions/setup-python@v3"
uses: "actions/setup-python@v5"
with:
python-version: "3.9"
python-version: "3.10"
- name: "Install Python Packages"
run: "pip install ansible-core"
- name: "Build the collection"
Expand All @@ -88,11 +86,11 @@ jobs:
if: "startsWith(github.ref, 'refs/tags/v')"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"
- name: "Set up Python"
uses: "actions/setup-python@v3"
uses: "actions/setup-python@v5"
with:
python-version: "3.9"
python-version: "3.10"
- name: "Install Python Packages"
run: "pip install ansible-core"
- name: "Create the ansible.cfg file"
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ docs/_build/*
pb.*.yml
.DS_Store
.env
invoke.yml

# https://github.com/ansible/ansible/issues/68499
# ansible_collections/
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.9"
python: "3.10"

python:
install:
Expand Down
20 changes: 20 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,26 @@ networktocode.nautobot Release Notes
.. contents:: Topics


v5.3.0
======

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

- networktocode.nautobot.vlan_location - Creates or removes Location assignments to VLANs from Nautobot
- networktocode.nautobot.contact - Creates or removes contacts from Nautobot
- networktocode.nautobot.team - Creates or removes teams from Nautobot
- networktocode.nautobot.controller - Creates or removes controllers from Nautobot
- networktocode.nautobot.admin_user - Creates or removes users from Nautobot
- networktocode.nautobot.admin_group - Creates or removes groups from Nautobot
- networktocode.nautobot.admin_permission - Creates or removes permissions from Nautobot

Minor Changes
-------------
- (#352) Added IPv6 support as the default IP version for `gql_inventory` plugin
- (#415) Added `role` option to `vm_interface` module
- (#416) Fixed `location_type` idempotency for `location` module

v5.2.1
======

Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
#
# This base stage just installs the dependencies required for production
# without any development deps.
ARG PYTHON_VER=3.9
ARG PYTHON_VER=3.10
FROM python:${PYTHON_VER} AS base

# Allow for flexible Python versions, for broader testing
ARG PYTHON_VER=3.9
ARG PYTHON_VER=3.10
ENV PYTHON_VERSION=${PYTHON_VER}
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update -yqq && apt-get install -yqq shellcheck && apt-get clean
Expand Down Expand Up @@ -60,7 +60,7 @@ FROM lint AS unittests
ARG ANSIBLE_COLLECTIONS_PATH=/usr/share/ansible/collections
ENV ANSIBLE_COLLECTIONS_PATH=${ANSIBLE_COLLECTIONS_PATH}

ARG PYTHON_VER=3.9
ARG PYTHON_VER=3.10
ENV PYTHON_VERSION=${PYTHON_VER}

# Allows for custom command line arguments to be passed to ansible-test (like -vvv)
Expand Down
48 changes: 43 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,54 @@
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)

# Nautobot modules for Ansible using Ansible Collections
# Nautobot Modules for Ansible using Ansible Collections

This collection provides Ansible modules to interact with Nautobot, an open-source Network Source of Truth and Network Automation Platform. The modules allow you to automate various tasks in Nautobot, such as managing devices, interfaces, IP addresses, and more. By using these modules, you can keep your Source of Truth (SOT) updated and ensure that your network data is accurate and consistent.

To keep the code simple, we only officially support the two latest releases of Nautobot and don't guarantee backwards compatibility beyond that.

## Requirements

- Nautobot 1.0.0+ or the two latest Nautobot releases
- Python 3.6+
- Python modules: **pynautobot 1.0.0+**
- Python modules: **pynautobot 2.x+**
- Ansible 2.9+
- Nautobot write-enabled token when using modules or read-only token for `lookup/inventory`

We have a new docs site live that can be found [here](https://nautobot-ansible.readthedocs.io/en/latest/).

> This is a fork of the netbox.netbox Ansible Galaxy collection found at [https://github.com/netbox-community/ansible_modules](https://github.com/netbox-community/ansible_modules) in February, 2021
## Keeping Your Source of Truth Updated

Using the Nautobot Ansible modules, you can ensure that your Nautobot instance remains the authoritative Source of Truth (SOT) for your network. These modules allow for the automation of data input and updates, helping maintain consistency and accuracy across your network configuration and documentation. Whether you are provisioning new devices, updating interface configurations, or managing IP addresses, the Nautobot modules for Ansible provide the tools necessary to automate and streamline these tasks.

## Interacting with the Nautobot Platform

The modules in this collection enable seamless interaction with the Nautobot platform. With these modules, you can:

- Automate the provisioning and deprovisioning of network resources.
- Integrate Nautobot with your CI/CD pipelines to ensure up-to-date network configurations.
- Leverage Nautobot's API to gather real-time data for network monitoring and troubleshooting.
- Implement Infrastructure as Code (IaC) practices by managing Nautobot resources declaratively through Ansible playbooks.

## Available Modules

Here is a list of available modules along with a brief description of each:

- **networktocode.nautobot.device**: Manage devices in Nautobot.
- **networktocode.nautobot.device_role**: Manage device roles in Nautobot.
- **networktocode.nautobot.device_type**: Manage device types in Nautobot.
- **networktocode.nautobot.interface**: Manage interfaces on devices in Nautobot.
- **networktocode.nautobot.ip_address**: Manage IP addresses in Nautobot.
- **networktocode.nautobot.site**: Manage sites in Nautobot.
- **networktocode.nautobot.tenant**: Manage tenants in Nautobot.
- **networktocode.nautobot.vlan**: Manage VLANs in Nautobot.
- **networktocode.nautobot.virtual_machine**: Manage virtual machines in Nautobot.
- **networktocode.nautobot.virtualization_cluster**: Manage virtualization clusters in Nautobot.
- **networktocode.nautobot.cable**: Manage cables in Nautobot.
- **networktocode.nautobot.circuit**: Manage circuits in Nautobot.
- **networktocode.nautobot.power_feed**: Manage power feeds in Nautobot.
- **networktocode.nautobot.rack**: Manage racks in Nautobot.
- **networktocode.nautobot.rack_group**: Manage rack groups in Nautobot.
- **networktocode.nautobot.inventory_item**: Manage inventory items in Nautobot.

## Releasing, Versioning, and Deprecation

Expand All @@ -24,6 +58,10 @@ We plan to regularly release new minor or bugfix versions once new features or b

Releasing the current major version happens from the `develop` branch with a release.

If backwards incompatible changes are able, we plan to deprecate the old behavior as early as possible. We also plan to backport at least bugfixes for the old major version for some time after releasing a new major version. We will not block community members from backporting other bugfixes and features from the latest stable version to older release branches, under the condition that these backports are of reasonable quality. Some changes may not be able to be back ported.
If backwards incompatible changes are necessary, we plan to deprecate the old behavior as early as possible. We also plan to backport at least bugfixes for the old major version for some time after releasing a new major version. We will not block community members from backporting other bugfixes and features from the latest stable version to older release branches, under the condition that these backports are of reasonable quality. Some changes may not be able to be backported.

> Some changes that would require immediate patching that are breaking changes will fall to SemVer and constitute a breaking change. These will only be done when necessary, such as to support working with the most recent 3 versions of Ansible. Backporting these changes may not be possible.
## History

> Some changes that would require immediate patching that are breaking changes will fall to SemVer and constitute a breaking change. These will only be done when necessary, such as to support working with the most recent 3 versions of Ansible. Backporting these changes may not be possible.
> This is a fork of the netbox.netbox Ansible Galaxy collection found at [https://github.com/netbox-community/ansible_modules](https://github.com/netbox-community/ansible_modules) in February, 2021
28 changes: 28 additions & 0 deletions changelogs/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -449,3 +449,31 @@ releases:
minor_changes:
- (#345) Added `NAUTOBOT_VALIDATE_CERTS` environment variable to disable SSL verification
- (#348) Fixed GraphQL Inventory plugin bug when device platform is None
5.3.0:
modules:
- description: Creates or removes Location assignments to VLANs from Nautobot
name: vlan_location
namespace: ''
- description: Creates or removes contacts from Nautobot
name: contact
namespace: ''
- description: Creates or removes teams from Nautobot
name: team
namespace: ''
- description: Creates or removes controllers from Nautobot
name: controller
namespace: ''
- description: Creates or removes users from Nautobot
name: admin_user
namespace: ''
- description: Creates or removes groups from Nautobot
name: admin_group
namespace: ''
- description: Creates or removes permissions from Nautobot
name: admin_permission
namespace: ''
changes:
minor_changes:
- (#352) Added IPv6 support as the default IP version for `gql_inventory` plugin
- (#415) Added `role` option to `vm_interface` module
- (#416) Fixed `location_type` idempotency for `location` module
1 change: 0 additions & 1 deletion development/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ x-nautobot-base: &nautobot-base
- "dev.env"
tty: true

version: "3.8"
services:
nautobot:
build:
Expand Down
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
version: "3.4"
x-args:
&args
PYTHON_VER: ${PYTHON_VER}
Expand Down
Loading

0 comments on commit 55f3e4a

Please sign in to comment.