Ansible warnings

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

[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"

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 ~

   tomcat.version ~ '-' ~ tomcat.build not in webpage.content

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