Did you ever find a solution to this?  I'm having the same issue.  Does the 
expect module really generate a python file, send it to the remote host, 
and execute it there to pull this off?  Can't it just execute like an 
expect script locally?

On Thursday, April 7, 2016 at 11:44:38 AM UTC-5, Craig Wilson wrote:
>
> Hi all
>
> We are looking into ansible and one of the things we would like to do is 
> issue a few commands to some storage appliances that we have. They are 
> looked down and as such we can not access sftp or even scp just ssh into 
> their custom command line interface.
>
> I'm testing this and I've managed to get raw module working to retrieve 
> information, as below:
>
> ---
> - hosts: Storage1
>   remote_user: user
>   gather_facts: no  
>   tasks:
>   - name: showcon
>     raw: show controller
>
>
> However when I use the expect module it still tries to use sftp, 
> ---
> - hosts: Storage1
>   remote_user: user
>   gather_facts: no
>   tasks:
>     - name: "ControllerRestart"
>       expect:
>         command: "shutdown controller restart"
>         responses:
>           (?i)REMOTE: "yes"
>
>
> and if I execute this I get
> Storage1 | UNREACHABLE! => {
>     "changed": false, 
>     "msg": "SSH Error: data could not be sent to the remote host. Make 
> sure this host can be reached over ssh", 
>     "unreachable": true
> }
>
>
>
>
> Is there any way to use the expect (or other modules) without ansible 
> running sftp/scp commands?
>

-- 
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/4668c74b-6c75-4689-9ec9-6cf4009aa6c2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to