Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/devel' into var-prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
h3po committed Nov 22, 2024
2 parents 65202b6 + 59e819f commit 91c30fb
Show file tree
Hide file tree
Showing 722 changed files with 40,291 additions and 9,960 deletions.
15 changes: 15 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
profile: production

exclude_paths:
- .cache/ # implicit unless exclude_paths is defined in config
- .venv/
- .github/

skip_list:
- args[module]
- no-handler
- yaml[key-duplicates]
- yaml[line-length]

offline: false
3 changes: 3 additions & 0 deletions .ansible-lint-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# This file contains ignores rule violations for ansible-lint
changelogs/fragments/ yaml[comments]
changelogs/changelog.yaml yaml[indentation]
42 changes: 20 additions & 22 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,6 @@ jobs:
- name: Run black
uses: psf/black@stable

- name: 'Yamllint'
uses: karancode/yamllint-github-action@master

#- name: Run isort
# uses: jamescurtin/isort-action@master

#- name: Run ruff
# uses: chartboost/ruff-action@v1

unit_testing:
runs-on: ubuntu-20.04
needs: linting
Expand Down Expand Up @@ -71,17 +62,17 @@ jobs:
runs-on: ubuntu-latest
needs: unit_testing
env:
python-version: "3.10"
python-version: "3.12"
strategy:
fail-fast: false
matrix:
include:
- VERSION: "v3.6"
NETBOX_DOCKER_VERSION: 2.7.0
include:
- VERSION: "v3.7"
NETBOX_DOCKER_VERSION: 2.7.0
- VERSION: "v4.0"
NETBOX_DOCKER_VERSION: 2.9.1
- VERSION: "v4.1"
NETBOX_DOCKER_VERSION: 3.0.1

steps:

Expand All @@ -95,7 +86,7 @@ jobs:
cd netbox-docker
git checkout ${{ matrix.NETBOX_DOCKER_VERSION }}
cp $GITHUB_WORKSPACE/tests/netbox-docker/${{ matrix.VERSION }}/docker-compose.override.yml docker-compose.override.yml
docker-compose up -d --quiet-pull netbox netbox-worker postgres redis redis-cache
docker compose up -d --quiet-pull netbox netbox-worker postgres redis redis-cache
docker container ls
cd ..
Expand All @@ -121,21 +112,28 @@ jobs:
- name: Wait for NetBox to be available
run: |
docker container ls
docker logs netbox-docker_netbox_1
timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:32768)" != "200" ]]; do echo "waiting for NetBox"; sleep 5; done' || false
working-directory: /home/runner/.ansible/collections/ansible_collections/netbox/netbox
#if: matrix.VERSION == 'v3.3'
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

- name: Pre-populate NetBox
run: ./tests/integration/netbox-deploy.py
working-directory: /home/runner/.ansible/collections/ansible_collections/netbox/netbox

- name: Run integration tests
# Run regression and integration tests
# Run the inventory test first, in case any of the other tests modify the data.
- name: Run inventory tests
continue-on-error: true
run: |
ansible-test integration -v --color --coverage --python ${{ env.python-version }} inventory-${{ matrix.VERSION }}
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 regression tests
continue-on-error: true
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
run: |
ansible-test integration -v --color --coverage --python ${{ env.python-version }} ${{ matrix.VERSION }}
ansible-test coverage report --all --omit "tests/*,hacking/*,docs/*" --show-missing
working-directory: /home/runner/.ansible/collections/ansible_collections/netbox/netbox
50 changes: 50 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
name: "CI"

concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

on: # yamllint disable-line rule:truthy
pull_request:
branches: [master, devel]
workflow_dispatch:
schedule:
- cron: '0 0 * * *'

jobs:
changelog:
uses: ansible/ansible-content-actions/.github/workflows/changelog.yaml@main
if: github.event_name == 'pull_request' && github.base_ref == 'devel'
build-import:
uses: ansible/ansible-content-actions/.github/workflows/build_import.yaml@main
ansible-lint:
uses: ansible/ansible-content-actions/.github/workflows/ansible_lint.yaml@main
sanity:
uses: minitriga/ansible-content-actions/.github/workflows/sanity.yaml@patch-1
unit-galaxy:
uses: minitriga/ansible-content-actions/.github/workflows/unit.yaml@patch-1
unit-source:
uses: ansible-network/github_actions/.github/workflows/unit_source.yml@main
with:
collection_pre_install: >-
git+https://github.com/ansible-collections/ansible.utils.git
all_green:
if: ${{ always() }}
needs:
- changelog
- sanity
- ansible-lint
- unit-galaxy
- unit-source
runs-on: ubuntu-latest
steps:
- run: >-
python -c "assert 'failure' not in
set([
'${{ needs.changelog.result }}',
'${{ needs.sanity.result }}',
'${{ needs.unit-galaxy.result }}',
'${{ needs.unit-source.result }}',
'${{ needs.ansible-lint.result }}'
])"
4 changes: 2 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
version: 2
#sphinx:
# configuration: docs/conf.py
# sphinx:
# configuration: docs/conf.py

build:
os: ubuntu-22.04
Expand Down
32 changes: 0 additions & 32 deletions .yamllint

This file was deleted.

71 changes: 70 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,76 @@ NetBox.NetBox Release Notes

.. contents:: Topics

v3.20.0
=======

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

- Add ``facility`` to ``location`` (https://github.com/netbox-community/ansible_modules/issues/1280)
- Add ``related_object_type`` to ``netbox_custom_filed`` (https://github.com/netbox-community/ansible_modules/issues/1268)
- Add ``status`` to ``location`` (https://github.com/netbox-community/ansible_modules/issues/1279)
- Add `description` to `netbox_cluster_group` module (https://github.com/netbox-community/ansible_modules/issues/1276)
- Add `serial` to `netbox_virtual_machine` module (https://github.com/netbox-community/ansible_modules/issues/1309)
- Add `status` to `netbox_cluster` (https://github.com/netbox-community/ansible_modules/issues/1275)
- Add `vid_ranges` to `netbox_vlan_group` module (https://github.com/netbox-community/ansible_modules/issues/1307)
- Add ability to rename variables set on the host by ``netbox.netbox.nb_inventory`` through configuration.
- Added option `hostname_field` to ``nb_inventory`` to be able to set the inventory hostname from a field in custom_fields
- Adjust tests for various modules
- Fix the form_factor option on netbox_rack
- Update CI for NetBox 4.1

Bugfixes
--------

- If `fetch_all` is `false`, prefix lookup depends on site lookup, so move it to secondary lookup (https://github.com/netbox-community/ansible_modules/issues/733)

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

- netbox.netbox.netbox_permission - Creates or removes permissions from NetBox
- netbox.netbox.netbox_token - Creates or removes tokens from NetBox
- netbox.netbox.netbox_tunnel - Create, update or delete tunnels within NetBox
- netbox.netbox.netbox_tunnel_group - Create, update or delete tunnel groups within NetBox
- netbox.netbox.netbox_user - Creates or removes users from NetBox
- netbox.netbox.netbox_user_group - Creates or removes user groups from NetBox

v3.19.1
=======

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

- Bump version 3.19.1

v3.19.0
=======

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

- Add cluster host to dynamic inventory response `#1219 <https://github.com/netbox-community/ansible_modules/pull/1219>`_
- Add galaxy-importer to CI process `#1245 <https://github.com/netbox-community/ansible_modules/issues/1245>`_
- Adjust modules to support NetBox v4.0.0 `#1234 <https://github.com/netbox-community/ansible_modules/pull/1234>`_
- Bump jinja2 from 3.1.2 to 3.1.4 `#1226 <https://github.com/netbox-community/ansible_modules/pull/1226>`_
- Bump requests from 2.31.0 to 2.32.0 `#1236 <https://github.com/netbox-community/ansible_modules/pull/1236>`_
- Drop obsolete Ansible and Python versions and fix tests `#1241 <https://github.com/netbox-community/ansible_modules/issues/1241>`_
- Get ansible-lint passing again (sequence after `#1241 <https://github.com/netbox-community/ansible_modules/issues/1241>`_) `#1243 <https://github.com/netbox-community/ansible_modules/issues/1243>`_
- Update CI process to follow Ansible Collection Standards `#1247 <https://github.com/netbox-community/ansible_modules/issues/1247>`_
- Update CI to use master instead of main. `#1253 <https://github.com/netbox-community/ansible_modules/issues/1253>`_
- Update ansible-lint to ignore changelog file for yaml indentation. `#1256 <https://github.com/netbox-community/ansible_modules/issues/1256>`_
- Update top-level README with new minimum Ansible version (sequence after `#1241 <https://github.com/netbox-community/ansible_modules/issues/1241>`_ `#1244 <https://github.com/netbox-community/ansible_modules/issues/1244>`_
- Updated CI to only run changelog job if PR into devel branch is detected. `#1251 <https://github.com/netbox-community/ansible_modules/issues/1251>`_
- Updated CI to support NetBox 4.0 `#1230 <https://github.com/netbox-community/ansible_modules/pull/1230>`_
- Updates to top-level README.md to align collection with Ansible best practices `#1238 <https://github.com/netbox-community/ansible_modules/issues/1238>`_

Bugfixes
--------

- Added ALLOWED_QUERY_PARAMS module_bay by device `#1228 <https://github.com/netbox-community/ansible_modules/pull/1228>`_
- Added label to power outlet `#1222 <https://github.com/netbox-community/ansible_modules/pull/1222>`_
- Added power outlet type iec-60320-c21 to power outlet template and power outlet modules `#1229 <https://github.com/netbox-community/ansible_modules/issues/1229>`_
- Extend query param for parent_location `#1233 <https://github.com/netbox-community/ansible_modules/issues/1233>`_

v3.18.0
=======
Expand Down Expand Up @@ -449,7 +519,6 @@ Release Summary
This release should fix obvious broken changes between collection and NetBox 2.11, but there is most likely more. Please report as they're encountered.
**packages** is now a required Python package and is already included in Ansible 2.10, but anyone using Ansible 2.9 or below must manually pip install the library.


Major Changes
-------------

Expand Down
Loading

0 comments on commit 91c30fb

Please sign in to comment.