How do I make changes to the below complex when condition without breaking 
the code in order to address the warning. 

 - debug: msg: "Hi"
         when: entrycurrdb.stdout.find("{{ 
hostvars['localhost']['BASEPATH_FINAL'] }}/{{ vars[(item | 
splitext)[1].split('.')[1] | default('exe')] }}/{{ item | basename }}") == -
1 and actualfile.stat.exists == True

Getting warning

Output:


TASK [shell] 
> *******************************************************************
> [WARNING]: conditional statements should not include jinja2 templating
> delimiters such as {{ }} or {% %}. Found: entrycurrdb.stdout.find("{{
> hostvars['localhost']['BASEPATH_FINAL'] }}/{{ vars[(item |
> splitext)[1].split('.')[1] | default('exe')] }}/{{ item | basename }}") == 
> -1
> and actualfile.stat.exists == True
> changed: [10.0.0.16]


Kindly suggests. 

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/344ea14e-1b5a-4e37-874b-9de23fc4e90a%40googlegroups.com.

Reply via email to