netbox-community / ansible_modules

NetBox modules for Ansible using Ansible Collections
GNU General Public License v3.0
333 stars 216 forks source link

[Feature]: Assign contact to devices #1128

Open ShAlab84 opened 11 months ago

ShAlab84 commented 11 months ago

NetBox version

v3.6.3

Feature type

New Module

Proposed functionality

A new module (i.e. netbox.netbox_contact_assign) with the goal of assigning primary,secondary,tertiary contacts to a device. I have found that function within the API under /api/tenancy/contact-assignments/, but not in the Ansible modules.

Use case

We have about 600+ servers and 800+ network devices and Netbox should act as a source-of-truth for IaaC and also as a source for operational tasks, accounting processes and more. I am able to initially migrate all data from an old sql-based inventory database via Ansible into netbox, add more fancy Netbox stuff that was not supported in the old database, except the contact assignment (administrative and/or owner).

I can add the contacts to netbox, but they are "hanging" around without any reference to the assets. Then I could assign it by hand device-by-device or use the API beside Ansible, which is annoying - because I already have a huge role-based Ansible setup for everything that is currently available.

The contact-assignment is one of the most used features in our daily operations. We do periodic security scans, CVE reports, update status reports, a.s.o. Then we match the system names in the reports with the contacts assigned to the devices to inform the responsible administrators to take some actions.

Is there a way to implement the contact_assignment function or is there already a module or version I have missed?

External dependencies

Netbox API: /api/tenancy/contact-assignments/

justinjobo commented 10 months ago

After much digging, I was not able to find a module either. +1 for this feature request

vishnubraj commented 7 months ago

+1

oyacky commented 2 months ago

+1