Hi Justin, currently there is no general purpose timeout parameter for
shell/commands, so the use of async as you've noted is the proper way to
limit the execution time of a long-running task.

Thanks!

On Mon, Sep 15, 2014 at 10:36 AM, Justin Jinsik Kim <[email protected]>
wrote:

> Hi,
>
> I want to define response waiting time limit for all shell commands on
> ansible-playbook
>
>
> test.yml:
> ....
> - name: want to quit if it doesn't get response in 5 secs
>   shell: "sleep 100"
>
> - name: want to quit if it doesn't get response in 5 secs
>   shell: "sleep 200"
>
> - name: want to quit if it doesn't get response in 5 secs
>   shell: "sleep 300"
>
> ....
>
>
>
> I know I can use async method for each task but is there any simple way to
> do this for all shell module command?
>
> I've tried this but it didn't work
>
> ex> ansible-playbook test.yml .... -T 50
> ex> add timeout=10 on ansible.cfg
>
>
> Thanks in advance,
> Justin
>
>  --
> 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/e942c4a7-c017-461d-a99b-956ccf9b5926%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/e942c4a7-c017-461d-a99b-956ccf9b5926%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAMFyvFhgb7Zk0aesaZpT3TCt6x08wrFWsfiarcR7Df%3D6DE5KUA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to