Hi All,


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


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


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

 

Thanks

Mohamed Javeed

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/9b09471e-8d12-4cc4-8456-03ff8604d0beo%40googlegroups.com.

Reply via email to