Hi Sagar
Thanks for your prompt reply , the test I have conducted was on Switch
Cisco 2960X when I change the host to a Cisco  9200 switch it surprisingly
works
and I am confused now , how would different switch types  give me different
results ?
Thank you


On Fri, Jul 29, 2022 at 2:04 AM Sagar Paul <[email protected]> wrote:

>
> Hi,
>
> Can you please check the collection version that you are using?
> I tried reproducing the same on my end. And it works fine for me.
>
> Regards,
> Sagar Paul
> On Thursday, July 28, 2022 at 10:59:47 PM UTC+5:30
> [email protected] wrote:
>
>> Hello All
>> I am getting unsupported parameter for ios_l2_interfaces error when I am
>> trying to run a simple playbook to change VLAN on an interface . I've
>> attached my playbook , inventory and anssible.cfg plus -vvv result .  other
>> gather fact playbooks would run fine but not this one .
>>
>> it is much appreciate if anyone can help me fix this.
>>
>> ----------------------------------------------------------------------------------
>>
>> *Inventory-2.yml*
>>
>> ---
>> all:
>>    children:
>>       switches:
>>          children:
>>             ios:
>>              hosts:
>>               sw-1:
>>                  ansible_host: 10.200.1.1
>>              vars:
>>                 ansible_become: yes
>>                 ansible_connection: local
>>                 ansible_become_method: enable
>>                 ansible_user: ncm
>>                 ansible_password: !vault |
>>                   $ANSIBLE_VAULT;1.2;AES256;userid01
>>
>>
>> ----------------------------------------------------------------------------------
>> *Playbook-3.yml:*
>>
>> ---
>>  - name: IOS Config Demo
>>    hosts: switches
>>
>>    tasks:
>>       - name: Configure Access
>>         ios_l2_interfaces:
>>           config:
>>             - name: GigabitEthernet2/0/25
>>               access:
>>                 vlan: 7
>>           state: merged
>> ------------------------------------------------------------
>> *ansible.cfg*
>>
>> [defaults]
>> export ANSIBLE_PARAMIKO_LOOK_FOR_KEYS=false
>>
>> [persistent_connection]
>> command_timeout = 60
>> ------------------------------------------------------------
>> *Result:*
>>
>> [user@ansiblecontroller inventory]# ansible-playbook --vault-id
>> user1@prompt playbook-3.yml -i inventory-2.yml -vvv
>>
>> fatal: [sw-1]: FAILED! => {
>>     "changed": false,
>>     "invocation": {
>>         "module_args": {
>>             "config": [
>>                 {
>>                     "access": {
>>                         "vlan": 7
>>                     },
>>                     "name": "GigabitEthernet2/0/25"
>>                 }
>>             ],
>>             "provider": {
>>                 "auth_pass": null,
>>                 "authorize": false,
>>                 "host": null,
>>                 "password": null,
>>                 "port": null,
>>                 "ssh_keyfile": null,
>>                 "timeout": null,
>>                 "username": null
>>             },
>>             "state": "merged"
>>         }
>>     },
>>     "msg": "Unsupported parameters for (ios_l2_interfaces) module:
>> provider Supported parameters include: config, state"
>> ------------------------------------------------------------
>>
>> Thank you
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Ansible Project" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/ansible-project/-Pui8AiMKmA/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/bc1dbc3d-8696-4d8d-bd63-18e526614249n%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/bc1dbc3d-8696-4d8d-bd63-18e526614249n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CABNDS_H-a%2BPAkN0NsjtSmLnDxDOwTC0zhQQg6zT_%3D4vEdQ1drQ%40mail.gmail.com.

Reply via email to