# Ansible warnings

**URL:** <https://forum.ansible.com/t/ansible-warnings/28024>\
**Category:** Ansible Project\
**Created:** [July 11, 2018, 7:40am UTC](https://forum.ansible.com/t/ansible-warnings/28024 "2018-07-11T07:40:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sreejith\_Sreejayan](https://avatars.discourse-cdn.com/v4/letter/s/278dde/32.png) [@Sreejith\_Sreejayan](https://forum.ansible.com/u/Sreejith_Sreejayan)\
**Post date:** [July 11, 2018, 7:40am UTC](https://forum.ansible.com/t/ansible-warnings/28024/1 "2018-07-11T07:40:06Z")

</div>

Is there any way to work around the error the when condition while after 2.3 ansible version it dosent support jinja template any fix for the below error

```auto
[WARNING]: when statements should not include jinja2 templating delimiters such as {{ }} or {% %}. Found: '{{ tomcat.version
}}-{{ tomcat.build }}' not in webpage.content

the playbook is using for both rhel6 and rhel7 so cant able to move to systemd module other solution is creating another task the put the when condition to check os family and apply . Is there any other nice idea to work around this ??   
[WARNING]: Ignoring "pattern" as it is not used in "systemd"

```

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [July 11, 2018, 9:49am UTC](https://forum.ansible.com/t/ansible-warnings/28024/2 "2018-07-11T09:49:38Z")

</div>

> Is there any way to work around the error the when condition while after  
> 2.3 ansible version it dosent support jinja template any fix for the below  
> error

It does, the when only take Jinja template, what is not supported is stacked {{ }}.

> [WARNING]: when statements should not include jinja2 templating  
> delimiters such as {{ }} or {% %}. Found: '{{ tomcat.version  
> }}-{{ tomcat.build }}' not in webpage.content

To make it work you need to use Jinja concatenation ~

&nbsp;&nbsp;&nbsp;tomcat.version ~ '-' ~ tomcat.build not in webpage.content

---

<div class="post-metadata">

**Author:** ![Sreejith\_Sreejayan](https://avatars.discourse-cdn.com/v4/letter/s/278dde/32.png) [@Sreejith\_Sreejayan](https://forum.ansible.com/u/Sreejith_Sreejayan)\
**Post date:** [July 11, 2018, 10:19am UTC](https://forum.ansible.com/t/ansible-warnings/28024/3 "2018-07-11T10:19:38Z")

</div>

is this look good when: “(tomcat.resweb.version ~ ‘-’ ~ tomcat.resweb.build) not in webpage.content” ??
