Thanks for your update.  But I have multiple plays in my playbook and those 
plays are being executed on hosts using add_hosts module.

"end_play" is terminated only that particular play and the following plays 
are being executed.

On Saturday, 24 November 2018 23:24:29 UTC+5:30, Uwe Sauter wrote:
>
> https://docs.ansible.com/ansible/2.7/modules/meta_module.html 
>
>
> - meta: end_play 
>    when: condition is true 
>
>
>
> Am 24.11.18 um 18:35 schrieb Kai Stian Olstad: 
> > On Saturday, 24 November 2018 18:19:26 CET Pandu jh wrote: 
> >> I have 3 plays in a playbook. In a task in 1st play, If the desired 
> value 
> >> is not set to variable, the execution should exist with success status 
> and 
> >> remaining plays also should not get executed. 
> > 
> > You could put play 2 and 3 in it's own file and use import_playbook: in 
> play 1 with a when statement. 
> > Because import is static all the task in the plays will be imported and 
> executed but because of the when they will all be skipped. 
> > 
>

-- 
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/c0d69f6a-7ee0-4164-837a-4b90c8d9b446%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to