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 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/bc1dbc3d-8696-4d8d-bd63-18e526614249n%40googlegroups.com.

Reply via email to