ansible_modules icon indicating copy to clipboard operation
ansible_modules copied to clipboard

[Feature]: create netbox_journal

Open ThomasADavis opened this issue 2 years ago • 6 comments

ISSUE TYPE
  • Feature Idea
SOFTWARE VERSIONS
NetBox:

Any netbox > 2.11.0 supports this.

SUMMARY

Support for creating/delete journals in ansible would be nice!

ThomasADavis avatar Nov 03 '21 16:11 ThomasADavis

@ThomasADavis How do you suggest we add this? Add this onto each module as a dictionary, or create a separate module for journals?

rodvand avatar Nov 04 '21 14:11 rodvand

Our goal is to use the journal as an audit log of ansible runs against that object (device/vm) I want to place an Ansible ARA URL into the journal. So, yes, I'm happy to be the test subject, and try to document this. What hasn't been decide is do we modify a specific journal entry, appending runs to it, or create an separate journal entry for each run.

since it's an separate API call (/extras/journal-entries), and that api can create/modify existing entries, I would like to see a module 1st.

There's also /extras/image-attachments and /extras/webhooks which would be good to have.

I would look at the tags module, it's an /extras/tag api call..

Not sure if any of the other modules does 2 separate API calls.

ThomasADavis avatar Nov 04 '21 15:11 ThomasADavis

so the tags and the config_context are /extra api modules. so, which name for this?

netbox_journal or netbox_extra_journal

ThomasADavis avatar Nov 04 '21 23:11 ThomasADavis

{
  assigned_object_type*	string
      title: Assigned object type
  assigned_object_id*	integer
      title: Assigned object id 
      maximum: 2147483647
      minimum: 0
  created_by	integer
       title: Created by
       x-nullable: true
  kind	string
      title: Kind
      Enum:  [ info, success, warning, danger ]
   comments*	string
      title: Comments
      minLength: 1
}

created_by == user_id kind == one of [ info, success, warning, danger ]

assigned_object_type can be: 'virtualization.virtualmachine' 'dcim.device' sites can have a journal entry. vlans can have a journal entry.

and so on.. makes it an individual module.

lookup module is missing journal support and few other extras..

ThomasADavis avatar Nov 04 '21 23:11 ThomasADavis

so the tags and the config_context are /extra api modules. so, which name for this?

netbox_journal or netbox_extra_journal

As no other modules has the extra/dcim/ipam prefix, I think a simple netbox_journal should suffice. I can look into adding the lookup support for the few extras missing.

rodvand avatar Nov 15 '21 10:11 rodvand

yea, I was going to add at least journal support to the lookup module and create the journal module, and then use both for the test part

but I've been slammed at work, so little free time.. we need journal support as an security audit showed us this to record ARA playbooks URL's.

ThomasADavis avatar Nov 15 '21 17:11 ThomasADavis