# getting error - "Unsupported parameters for (cli\_command) module"

**URL:** <https://forum.ansible.com/t/getting-error-unsupported-parameters-for-cli-command-module/33137>\
**Category:** Ansible Project\
**Created:** [June 10, 2020, 4:06am UTC](https://forum.ansible.com/t/getting-error-unsupported-parameters-for-cli-command-module/33137 "2020-06-10T04:06:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bmohanraj](https://avatars.discourse-cdn.com/v4/letter/b/b487fb/32.png) [@bmohanraj](https://forum.ansible.com/u/bmohanraj)\
**Post date:** [June 10, 2020, 4:06am UTC](https://forum.ansible.com/t/getting-error-unsupported-parameters-for-cli-command-module/33137/1 "2020-06-10T04:06:02Z")

</div>

Hello,

I getting error - “Unsupported parameters for (cli\_command) module” when trying to run install activate command in cat9k device.

**Below is the playbook snippet:**

`

- name: Run install activate and reload  
block:

- name: Run install activate  
cli\_command:  
commands:

- command: ‘install activate’  
check\_all: True  
prompt:

- “Press Quit(q) to exit, you may save configuration and re-enter the command”

- “This operation requires a reload of the system. Do you want to proceed”  
answer:

- ‘y\r’

- ‘y\r’  
vars:  
ansible\_command\_timeout: 1200

- name: Reload device and wait for connection to establish  
wait\_for:  
host: “{{ inventory\_hostname }}”  
port: 22  
delay: 60  
timeout: 720

- name: Show version  
cli\_command:  
commands:

- command: “sh version”  
`

**Run the ansible-playbook with -vvv.**

` TASK [CAT9K-Upgrade : Run install activate] ****************************************************************************************************************************** task path: /root/ansible/imageupgrade/CAT9K-Upgrade/tasks/main.yml:7 <192.168.23.24> ESTABLISH LOCAL CONNECTION FOR USER: root <192.168.23.24> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-local-164668ym091 `"&& mkdir /root/.ansible/tmp/ansible-local-164668ym091/ansible-tmp-1591766752.49-16488-79665405661014 && echo ansible-tmp-1591766752.49-16488-79665405661014="` echo /root/.ansible/tmp/ansible-local-164668ym091/ansible-tmp-1591766752.49-16488-79665405661014 `" ) && sleep 0’  
\<192.168.23.24\> Attempting python interpreter discovery  
\<192.168.23.24\> EXEC /bin/sh -c ‘echo PLATFORM; uname; echo FOUND; command -v ‘"’"’/usr/bin/python’“'”‘; command -v ‘"’“‘python3.7’”’“'; command -v '”‘“‘python3.6’”’“'; command -v '”‘“‘python3.5’”’“'; command -v '”‘“‘python2.7’”’“'; command -v '”‘“‘python2.6’”’“'; command -v '”‘"’/usr/libexec/platform-python’“'”‘; command -v ‘"’"’/usr/bin/python3’“'”‘; command -v ‘"’“‘python’”’"‘; echo ENDFOUND && sleep 0’  
\<192.168.23.24\> EXEC /bin/sh -c ‘/usr/bin/python && sleep 0’  
Using module file /usr/lib/python2.7/site-packages/ansible/modules/network/cli/cli\_command.py  
\<192.168.23.24\> PUT /root/.ansible/tmp/ansible-local-164668ym091/tmplDs5p1 TO /root/.ansible/tmp/ansible-local-164668ym091/ansible-tmp-1591766752.49-16488-79665405661014/AnsiballZ\_cli\_command.py  
\<192.168.23.24\> EXEC /bin/sh -c ‘chmod u+x /root/.ansible/tmp/ansible-local-164668ym091/ansible-tmp-1591766752.49-16488-79665405661014/ /root/.ansible/tmp/ansible-local-164668ym091/ansible-tmp-1591766752.49-16488-79665405661014/AnsiballZ\_cli\_command.py && sleep 0’  
\<192.168.23.24\> EXEC /bin/sh -c ‘/usr/bin/python /root/.ansible/tmp/ansible-local-164668ym091/ansible-tmp-1591766752.49-16488-79665405661014/AnsiballZ\_cli\_command.py && sleep 0’  
\<192.168.23.24\> EXEC /bin/sh -c ‘rm -f -r /root/.ansible/tmp/ansible-local-164668ym091/ansible-tmp-1591766752.49-16488-79665405661014/ \> /dev/null 2\>&1 && sleep 0’  
fatal: [192.168.23.24]: FAILED! =\> {  
“ansible\_facts”: {  
“discovered\_interpreter\_python”: “/usr/bin/python”  
},  
“changed”: false,  
“invocation”: {  
“module\_args”: {  
“commands”: [  
{  
“answer”: [  
“y\r”,  
“y\r”  
],  
“check\_all”: true,  
“command”: “install activate”,  
“prompt”: [  
“Press Quit(q) to exit, you may save configuration and re-enter the command”,  
“This operation requires a reload of the system. Do you want to proceed”  
]  
}  
]  
}  
},  
“msg”: “Unsupported parameters for (cli\_command) module: commands Supported parameters include: answer, check\_all, command, newline, prompt, sendonly”  
}

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
192.168.23.24 : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0

`

How to fix this issue?

Thanks,  
Mohan

---

<div class="post-metadata">

**Author:** ![Ompragash](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ompragash/32/9070_2.png) [@Ompragash](https://forum.ansible.com/u/Ompragash)\
**Post date:** [June 10, 2020, 4:46am UTC](https://forum.ansible.com/t/getting-error-unsupported-parameters-for-cli-command-module/33137/2 "2020-06-10T04:46:59Z")

</div>

Hi Mohanraj,

As the error states, you have defined an unsupported parameter “commands” for cli\_command module and your task should look something like below:

```auto
- name: run command expecting user confirmation
  cli_command:
    command: show interface summary
    prompt: Press any key to continue
    answer: y
    newline: false

```

Refer [https://docs.ansible.com/ansible/latest/modules/cli\_command\_module.html](https://docs.ansible.com/ansible/latest/modules/cli_command_module.html)

Regards,  
Ompragash

---

<div class="post-metadata">

**Author:** ![bmohanraj](https://avatars.discourse-cdn.com/v4/letter/b/b487fb/32.png) [@bmohanraj](https://forum.ansible.com/u/bmohanraj)\
**Post date:** [June 10, 2020, 5:04am UTC](https://forum.ansible.com/t/getting-error-unsupported-parameters-for-cli-command-module/33137/3 "2020-06-10T05:04:17Z")

</div>

Thanks, issue resolved
