ansible_modules icon indicating copy to clipboard operation
ansible_modules copied to clipboard

[Feature]: Module Defaults (group/netbox)

Open FragmentedPacket opened this issue 3 years ago • 2 comments

ISSUE TYPE
  • Feature Idea
SUMMARY

Implement module_defaults to the NetBox collection.

The implementation required is within meta/runtime.yml with adding the action_groups keyword.

E.g.

---
action_groups:
  netbox:
    - netbox_device
    - netbox_ip_addresses
    - etc.

This should allow users to define module_defaults and supply the following in a playbook and then omit those parameters from the tasks themself:

---
- hosts: localhost
   module_defaults:
     group/netbox:
       netbox_url: ....
       netbox_token: .....

More info here.

FragmentedPacket avatar Jan 10 '21 19:01 FragmentedPacket

I have a branch for this, but won't take affect until https://github.com/ansible/ansible/issues/72006 is merged in and I assume that will be available Ansible 2.11.

I will keep my branch with the work and then push up once we can test.

FragmentedPacket avatar Jan 20 '21 04:01 FragmentedPacket

Assign to me please, I'd like to attempt to implement.

nahun avatar Nov 19 '21 21:11 nahun

Implemented in https://github.com/netbox-community/ansible_modules/pull/800

rodvand avatar Oct 26 '22 20:10 rodvand