Its not giving the output for list Repository command.

fatal: [10.100.100.187]: FAILED! => {
    "changed": true,
    "cmd": "ssh -l admin localhost -p 10000",
    "delta": "0:00:30.821117",
    "end": "2017-07-31 13:54:57.711477",
    "failed": true,
    "invocation": {
        "module_args": {
            "chdir": null,
            "command": "ssh -l admin localhost -p 10000",
            "creates": null,
            "echo": false,
            "removes": null,
            "responses": {
                "OVM>": [
                    "list Repository"
                ],
                "admin@localhost's password": "xyz"
            },
            "timeout": 30
        }
    },
    "rc": 255,
    "start": "2017-07-31 13:54:26.890360",
    "stdout": "OVM> list Repository",
    "stdout_lines": [
        "OVM> list Repository"
    ]
}
        to retry, use: --limit @/home/sara.bckup.priv/main.retry


task:
- expect:
   command: ssh -l admin localhost -p 10000
   responses:
     admin@localhost's password: "xyz"
     OVM>:
      - list Repository



On Friday, 28 July 2017 17:00:36 UTC-4, Kai Stian Olstad wrote:
>
> On 28. juli 2017 22:49, SARANYA devotional R wrote: 
> > Thanks Kai! 
> > 
> > I am a new beginner to Ansible. if I want to  execute series of a 
> commands 
> > in OVM prompt like list repository etc, what should I do? 
>
> Expect takes a list on responses, the fist time it get the response it 
> will give the first entry, on the second respense the second and so on. 
>
> I don't know what commands a OVM prompt take, but lets say you would 
> like to run "show something", "list something" and "get something" in 
> that order it would be like this. 
>
>    - expect: 
>        command: ssh -l admin localhost -p 10000 
>        responses: 
>          admin@localhost's password: "xyz" 
>          OVM>: 
>            - show something 
>            - list something 
>            - get something 
>
>
> -- 
> Kai Stian Olstad 
>

-- 
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/84c1c9bc-697e-42ff-a0b1-7c1d2389bed0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to