ansible_modules icon indicating copy to clipboard operation
ansible_modules copied to clipboard

added primary_ip4_netmask to output

Open rooso opened this issue 6 months ago • 0 comments

Related Issue

#931

New Behavior

nb_inventory plugin returns netmask if primary ip4 address is linked to virtual machine:

"primary_ip4": "192.168.0.1"
"primary_ip4_netmask": "255.255.255.0"

Contrast to Current Behavior

nb_inventory plugin returns only the primary_ip4:

"primary_ip4": "192.168.0.1"

Discussion: Benefits and Drawbacks

Useful if netbox is used as source for the ip addresses to create virtual machines using ansible. There are now drawbacks of this change as it is just a attribute that is passed along with the inventory if a primary_ip4 is linked to a virtual machine.

Changes to the Documentation

no update needed

Proposed Release Note Entry

Adds the ability to return primary_ip4_netmask for virtual machines in nb_inventory plugin

Double Check

  • [x] I have read the comments and followed the CONTRIBUTING.md.
  • [x] I have explained my PR according to the information in the comments or in a linked issue.
  • [x] My PR targets the devel branch.

rooso avatar Jul 30 '24 12:07 rooso