Hi Mark

you can add a pause task - 
see http://docs.ansible.com/ansible/pause_module.html

It might suit your needs in this case to put it into a role so you can pass 
in an appropriate pause

All the best,

Jon

On Wednesday, May 18, 2016 at 3:45:16 PM UTC+1, Mark Matthews wrote:
>
> Hi
>
>  
>
> Not sure if you able to assist with this question, but is it at all 
> possible to setup a ‘wait’ function between roles in a playbook?
>
>  
>
> So if I have the following playbook:
>
>  
>
> ---
>
> - name: Config Web Servers
>
>   hosts: all
>
>   roles:
>
>     - web_common
>
>     - win_update
>
>     - wintech_domain
>
>     - win_reboot
>
>  
>
> web_common has a few PowerShell scripts that it runs at the end of the 
> playbook, and it takes a few minutes in order for these to finish on the 
> servers. Obviously after Ansible has run the PowerShell script in the 
> playbook it considers the job as completed and moves on.
>
> So what is happening is that the next role is being executed before the 
> Powershell scripts have finished…and this is causing problems.
>
>  
>
> So I want to know if there is a way to add some kind of ‘wait’ function so 
> that the next role on starts after a desired time?
>
>  
>
> Cheers
>
> Mark
>

-- 
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/6aee900b-999a-4f33-94e3-d897aa72b1f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to