I'm afraid there isn't any. Jinja is a template engine, hence the default
output is a string. This was the intention of the developers, I think.
Otherwise one would have to explicitly convert the output of mathematics
expressions to strings.
Some notes to the examples:
* The output of the example isn't INT. It's a string. The consequent task
confirms this
- debug:
msg: Variable myvar is a string
when: myvar is string
* Also the following task will fail
- debug:
msg: "{{ myvar + 4 }}"
with error message:
"Unexpected templating type error occurred on ({{ myvar + 4 }}):
coercing to Unicode: need string or buffer, int found"
* Instead the conversion to integer works as expected