*Thank you Kai for response. Unfortunately this did NOT work. Let me
explain this scenario once again.*
*Here is Complete expect Module Code.*
- name: Perform auto prompt for *responses*
expect:
chdir: /tools/murthy/AOCL-SDK-16.0
command: /bin/bash setup_pro.sh
responses:
'Press \[Enter\] to continue:': \n
'--More--' : \r
timeout: 180
echo: yes
- name: Perform auto prompt for *responses2*
expect:
chdir: /tools/murthy/AOCL-SDK-16.0
command: /bin/bash setup_pro.sh
responses:
'Do you accept this license\? \[y/n\]': y\n
echo: yes
*Here is Error and final OUT PUT @ below, Can you explain whether first
expect module being executed ?? I am suspecting this command NOT being
executed and timeout happening. When I run manually from terminal, I need
to press [Enter] command @ least 20 times and works OK. but when I use this
expect module, I am NOT able GET this work. I have also separated two
responses also for easy debugging.*
fatal: [10.10.10.147]: FAILED! => {
"changed": true,
"cmd": "/bin/bash setup_pro.sh",
"delta": "0:03:07.381255",
"end": "2017-05-26 12:21:14.170676",
"failed": true,
"invocation": {
"module_args": {
"chdir": "/tools/murthy/AOCL-SDK-16.0",
"command": "/bin/bash setup_pro.sh",
"creates": null,
"echo": true,
"removes": null,
"responses": {
"--More--": "\\r",
"Press \\[Enter\\] to continue:": "\\n"
},
"timeout": 180
}
},
"msg": "command exceeded timeout",
"rc": null,
"start": "2017-05-26 12:18:06.789421",
Also OUTPUT here
"",
"",
"Press [Enter] to continue:\\n",
"",
"",
"Do you accept this license? [y/n]: "
]
}
On Friday, May 26, 2017 at 10:57:02 AM UTC-7, Kai Stian Olstad wrote:
>
> On 25. mai 2017 22:22, Murthy Vipparthy wrote:
> >
> > *Kai*
> > Here is my playbook command
> >
> > # ansible-playbook opencl.yml --ask-become-pass -vvvv
> >
> >
> > When I use my Playbook with below option while
> >
> > responses:
> > 'Press \[Enter\] to continue:': \n
> > '--More--' : \r
> > 'Do you accept this license\?\[y/n\]': y
> >
> > I am being stuck @ Output like below and this is NOT further
> proceeding
> > for rest of responses
> >
> > * "", "Press [Enter] to continue:", "", "Do
> you
> > accept this license? [y/n]: " ]} Any help on this Thank you
> -Murthy*
>
> According to your output you are missing a space between the question
> mark and the square bracket in your responses.
>
> --
> 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/e247f8cc-ccec-4f8c-a256-1c19accfc8ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.