# Skip default params from every module in a collection

**URL:** <https://forum.ansible.com/t/skip-default-params-from-every-module-in-a-collection/3184>\
**Category:** Get Help\
**Tags:** netscaler, playbook, collections\
**Created:** [January 6, 2024, 5:45am UTC](https://forum.ansible.com/t/skip-default-params-from-every-module-in-a-collection/3184 "2024-01-06T05:45:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sumanth-lingappa](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sumanth-lingappa/32/839_2.png) [@sumanth-lingappa](https://forum.ansible.com/u/sumanth-lingappa)\
**Post date:** [January 6, 2024, 5:45am UTC](https://forum.ansible.com/t/skip-default-params-from-every-module-in-a-collection/3184/1 "2024-01-06T05:45:29Z")

</div>

I am the maintainer of `netscaler.adc` ansible collection.

Every module in this collection is an API call to the NetScaler ADC device to configure it.

Every module has some common params (attributes) which have to be present in the playbook-task (OR optionally, environment variable also can be read)

common params are: `nsip`, `nitro_user`, `nitro_pass`, `nitro_protocol`, `validate_certs`, `save_config`

Is there any way I can enhance my collection to skip (or specifiy) these common params in the playbook?

Thank you

Eg can be found in the below file

> <https://github.com/netscaler/ansible-collection-netscaleradc/blob/main/examples/lbvserver.yaml>

---

<div class="post-metadata">

**Author:** ![felixfontein](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/felixfontein/32/7530_2.png) [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Post date:** [January 6, 2024, 7:46am UTC](https://forum.ansible.com/t/skip-default-params-from-every-module-in-a-collection/3184/2 "2024-01-06T07:46:42Z")

</div>

You can use module default groups, also known as action groups: [Module defaults — Ansible Documentation](https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_module_defaults.html#module-defaults-groups)

Example of a collection using that:

- [community.routeros/meta/runtime.yml at main · ansible-collections/community.routeros · GitHub](https://github.com/ansible-collections/community.routeros/blob/main/meta/runtime.yml#L7-L13)
- [How to connect to RouterOS devices with the RouterOS API — Community.Routeros Collection documentation](https://ansible-collections.github.io/community.routeros/branch/main/docsite/api-guide.html#using-the-community-routeros-api-module-defaults-group)

---

<div class="post-metadata">

**Author:** ![sumanth-lingappa](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sumanth-lingappa/32/839_2.png) [@sumanth-lingappa](https://forum.ansible.com/u/sumanth-lingappa)\
**Post date:** [January 7, 2024, 2:38pm UTC](https://forum.ansible.com/t/skip-default-params-from-every-module-in-a-collection/3184/3 "2024-01-07T14:38:19Z")

</div>

Thank you @felixfontein as always 🙂

---

<div class="post-metadata">

**Author:** ![sumanth-lingappa](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sumanth-lingappa/32/839_2.png) [@sumanth-lingappa](https://forum.ansible.com/u/sumanth-lingappa)\
**Post date:** [January 8, 2024, 8:14am UTC](https://forum.ansible.com/t/skip-default-params-from-every-module-in-a-collection/3184/4 "2024-01-08T08:14:07Z")

</div>

Hello @felixfontein, is there a way I can use `module defaults` in my integration tests (using roles) ?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [February 7, 2024, 8:15am UTC](https://forum.ansible.com/t/skip-default-params-from-every-module-in-a-collection/3184/5 "2024-02-07T08:15:02Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
