# how to turn float in integer ?

**URL:** <https://forum.ansible.com/t/how-to-turn-float-in-integer/14584>\
**Category:** Ansible Project\
**Created:** [February 17, 2014, 10:43pm UTC](https://forum.ansible.com/t/how-to-turn-float-in-integer/14584 "2014-02-17T22:43:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Patrik\_Uytterhoeven](https://avatars.discourse-cdn.com/v4/letter/p/0ea827/32.png) [@Patrik\_Uytterhoeven](https://forum.ansible.com/u/Patrik_Uytterhoeven)\
**Post date:** [February 17, 2014, 10:43pm UTC](https://forum.ansible.com/t/how-to-turn-float-in-integer/14584/1 "2014-02-17T22:43:30Z")

</div>

Hi,

when i use the memory fact in my template and divide the memory and the outcome is a float  
is there a way to turn the float into an integer in Ansible ?

---

<div class="post-metadata">

**Author:** ![Brian\_Coca1](https://avatars.discourse-cdn.com/v4/letter/b/278dde/32.png) [@Brian\_Coca1](https://forum.ansible.com/u/Brian_Coca1)\
**Post date:** [February 18, 2014, 2:50pm UTC](https://forum.ansible.com/t/how-to-turn-float-in-integer/14584/2 "2014-02-18T14:50:48Z")

</div>

{{floatvar|int}}
