Erreur parameter in ios_command module

Hello;

I wanted to update switch cisco by ansible. To copy the ios image from SFTP server, the playbook deployment will display the following error:

FAILED! => {“changed”: false, “msg”: “Unsupported parameters for (ios_command) module: register Supported parameters include: auth_pass, authorize, commands, host, interval, match, password, port, provider, retries, ssh_keyfile, timeout, username, wait_for”}

ansible --version:

ansible 2.9.9
config file = /etc/ansible/cisco/test/ansible.cfg
configured module search path = [u’/etc/ansible/ntc-ansible/ntc-ansible/library’]
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /bin/ansible
python version = 2.7.5 (default, Aug 7 2019, 00:51:29) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)

group_vars:

new_ios : c2960s.152-2.E8.bin
name : xxxx
pswd : xxxx

Playbook:

  • name: Upgrade IOS
    hosts: host
    connection: local
    gather_facts: no

vars:
provider:
authorize: yes
host: “{{ host }}”
username: “{{ username }}”
password: “{{ password }}”
auth_pass: “{{ password_enable }}”

tasks:

  • name: Copy IOS to flash
    delegate_to: localhost
    ios_command:
    command: “scp -p 22 sftp://XX.XX.XX.XX/{{ new_ios }} bootflash:”
    username: “{{ name }}”
    password: “{{ pswd }}”
    prompt: ‘[{{ new_ios }}]’
    answer: “\r”
    register: config

  • debug: msg=“{{ config.stdout }}”

vars:
ansible_command_timeout: 18000
delay_factor: 12

Thank you in advance for your proposals.

Regards.

Apparently ios_command module accepts commands (in plural) instead of command.

Regards,