Hi.

I am having an issue with Ansible's expect module.

I am trying to run simple commands on a Oracle SBC, but getting some errors.

Playbook:

- name: Check CPU
hosts: all
connection: local
gather_facts: yes


tasks:

- name: Get CPU load
expect:
command: ssh admin@#########
responses:
'password: ':
- #######
'#':
- sh platform cpu-load



Error:

fatal: [######]: FAILED! => { "changed": false, "invocation": { 
"module_args": { "chdir": null, "command": "ssh admin@######", "creates": 
null, "echo": false, "removes": null, "responses": { "#": [ "sh platform 
cpu-load" ], "password: ": [ "######" ] }, "timeout": 30 } }, "msg": "No 
remaining responses for '#', output was ' sh platform 
cpu-load\r\nTimestamp: 10:49:41 Wed 2020-02-05\r\nTotal load : 4%\r\nCPU 00 
load : 5%\r\nCPU 01 load : 3%\r\nCPU 02 load : 5%\r\nCPU 03 load : 
5%\r\nVOXBDLHA1#'" } 

I #ed out the IP and password

Your assistance will be appreciated.

-- 
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/2ed4a7da-5295-44a8-9dc6-61d114d0255e%40googlegroups.com.

Reply via email to