Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
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
19 changes: 13 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ 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
Expand Down Expand Up @@ -66,7 +73,7 @@ jobs:
strategy:
fail-fast: false
matrix:
include:
include:
- VERSION: "v4.1"
NETBOX_DOCKER_VERSION: 3.0.1
- VERSION: "v4.2"
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/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
1 change: 1 addition & 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
1 change: 1 addition & 0 deletions changelogs/fragments/1182-fix-contact-groups.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
minor_changes:
- Change `netbox_contact.contact_group` to `contact_groups`
- Add integration tests for contact groups
1 change: 1 addition & 0 deletions changelogs/fragments/1433-add-custom-headers.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---
minor_changes:
- Add support for custom headers for all modules
1 change: 1 addition & 0 deletions changelogs/fragments/1435-fix-duplicate-task-name.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---
bugfixes:
- Fix task duplicate task name in documentation that cause ansible-lint error
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---
bugfixes:
- nb_inventory - Fix service collection for version greater than 4.3
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
bugfixes:
- 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.
Expand Down
1 change: 1 addition & 0 deletions changelogs/fragments/1459-add-netbox-data-sources.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---
minor_changes:
- netbox_data_source - New module `#1459 <https://github.com/netbox-community/ansible_modules/pull/1459>`
1 change: 1 addition & 0 deletions changelogs/fragments/1462-fix-pylint-errors.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---
minor_changes:
- Fix ansible-bad-import-from pylint errors
1 change: 1 addition & 0 deletions changelogs/fragments/1464-fix-mac-lookup-by-id.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---
bugfixes:
- "nb_device_interface: Fix specifying primary_mac_address objects by id for disambiguation"
1 change: 1 addition & 0 deletions changelogs/fragments/1469-fix-old-apis.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---
minor_changes:
- Fix broken code path when using old api path on old netbox systems
1 change: 1 addition & 0 deletions changelogs/fragments/contacts.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---
minor_changes:
- netbox_contact_assignment - New module `#1480 <https://github.com/netbox-community/ansible_modules/pull/1480>`
1 change: 1 addition & 0 deletions changelogs/fragments/nb_inventory.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---
bugfixes:
- nb_inventory - Fixed empty inventory results when netbox server URL is a non-root path
1 change: 1 addition & 0 deletions changelogs/fragments/netbox_circuit_termination.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---
minor_changes:
- netbox_circuit_termination - Add parameters termination_id and termination_type for NetBox 4.2+
1 change: 1 addition & 0 deletions changelogs/fragments/netbox_custom_field.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---
minor_changes:
- Support for related_object_filter when related_object_type is "object"
1 change: 1 addition & 0 deletions changelogs/fragments/netbox_service.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---
bugfixes:
- netbox_service - Fix issue 1426 - broken netbox_service module
1 change: 1 addition & 0 deletions changelogs/fragments/netbox_tag.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---
minor_changes:
- netbox_tag - Add support for object_types on tags
1 change: 1 addition & 0 deletions changelogs/fragments/users-ordering.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---
minor_changes:
- user.groups, user.permissions, user_group.permissions, permission.actions, and permission.object_types are now treated as unordered sets for update comparison purposes.
3 changes: 3 additions & 0 deletions changelogs/fragments/yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
minor_changes:
- add yamllint to project pipeline.
1 change: 1 addition & 0 deletions requirements.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---
collections:
- name: .
Loading