On Wed, Feb 27, 2019, at 1:43 PM, Pandu jh wrote:
> 
> If there are no hosts added to add host, subsequent plays should be 
> skipped. Please let me know how to provide when condition for this
> 

with import_*, the import happens unconditionally and the specified conditions 
on the import are applied to each task imported.

V/r,
James Cassell

> - name:
>   hosts:  rchadm01
>   vars_files:
>   - var.yml
>   tasks:
>     - name: 
>       add_host:
>         name: "{{ decom_host }}"
>         groups: decom_host_group
> 
> - import_playbook: sub_plays/play2.yml
>   when: '"decom_host_group" not in group_names'
>   
> 

-- 
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/cc530246-ad74-40fa-ada7-b6647d8040de%40www.fastmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to