Thank you, It worked.

On Friday, 1 March 2019 00:50:41 UTC+5:30, Kai Stian Olstad wrote:
>
> On 28.02.2019 13:52, Pandu jh wrote: 
> > When Condition check is not working in a list as expected. 
> > 
> > My requirement is 
> > 
> > Playbook should not fail If all the three mentioned variables have 
> > "no_share" value. 
> > But it's failing not sure what causing this issue. 
> > 
> > 
> > 
> >      - debug:  var=open_shares_info 
> >      - debug:  var=linked_dirs_list 
> >      - debug:  var=nfs_hard_mounts 
> > 
> >      - name: Fail Playbook Execution 
> >        fail: 
> >          msg:  "Make sure to unshare/unmount all NFS shares in NFS 
> clients" 
> >        when:  ("'no_share' not in open_shares_info") and  ("'no_share' 
> not 
> > in linked_dirs_list") and and ("'no_share' not in nfs_hard_mounts") 
>
> In Jinja template that when uses, quotes, single and double, means this is 
> a string. 
> So when you put a double quote around the hole expressing you are making 
> it a sting. 
>
> In you when its 
>
>   a_string and a_string and a_string 
>
> Remove the double quotes and it should work. (and also remove the double 
> and) 
>
>
> -- 
> 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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/663baafd-b64f-44c2-86aa-e41a59ee6574%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to