# Default values are also added part of user input in ansible resource modules, is this bug or by design?

**URL:** <https://forum.ansible.com/t/default-values-are-also-added-part-of-user-input-in-ansible-resource-modules-is-this-bug-or-by-design/33097>\
**Category:** Ansible Developer\
**Created:** [June 5, 2020, 6:53am UTC](https://forum.ansible.com/t/default-values-are-also-added-part-of-user-input-in-ansible-resource-modules-is-this-bug-or-by-design/33097 "2020-06-05T06:53:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mohamed\_Javeed](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@Mohamed\_Javeed](https://forum.ansible.com/u/Mohamed_Javeed)\
**Post date:** [June 5, 2020, 6:53am UTC](https://forum.ansible.com/t/default-values-are-also-added-part-of-user-input-in-ansible-resource-modules-is-this-bug-or-by-design/33097/1 "2020-06-05T06:53:45Z")

</div>

Hi,

Need clarification on

Below is the configuration available in switch:

- name: Ethernet28

access:

vlan: 11

trunk:

- vlan: 12

- vlan: 13

Delete all allowed VLANs NOT access VLAN:

- name: “Delete all allowed VLANs NOT access VLAN”

sonic\_l2\_interfaces:

config:

- name: Ethernet28

trunk:

state: deleted

**Inside the module,**

but **expected want variable** data inside the module coming as below:

- name: Ethernet28

trunk: null

**but _actual_ want variable data inside the module coming as below: because both the values are coming as null, in module there is no way to differentiate whats the user input that needs to be deleted?**

- name: Ethernet28

access: null

trunk: null

is this a bug or as per design?

These default values are added at [https://github.com/ansible/ansible/blob/stable-2.9/lib/ansible/module\_utils/basic.py#L1837](https://github.com/ansible/ansible/blob/stable-2.9/lib/ansible/module_utils/basic.py#L1837)

if this is by design, how to delete only access or trunk VLANs?

Thanks

Mohamed Javeed
