# Wrong variable substituion in template

**URL:** <https://forum.ansible.com/t/wrong-variable-substituion-in-template/20336>\
**Category:** Ansible Project\
**Created:** [January 25, 2016, 12:11pm UTC](https://forum.ansible.com/t/wrong-variable-substituion-in-template/20336 "2016-01-25T12:11:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonatas\_Baldin](https://avatars.discourse-cdn.com/v4/letter/j/ba8739/32.png) [@Jonatas\_Baldin](https://forum.ansible.com/u/Jonatas_Baldin)\
**Post date:** [January 25, 2016, 12:11pm UTC](https://forum.ansible.com/t/wrong-variable-substituion-in-template/20336/1 "2016-01-25T12:11:35Z")

</div>

Hi, how are you guys?

I got a problem in variable substitution in one template. I don’t know if I’m doing something wrong or it may be a bug.

Here’s the deal:

I’ve got this playbook:

---

<div class="post-metadata">

**Author:** ![Jonatas\_Baldin](https://avatars.discourse-cdn.com/v4/letter/j/ba8739/32.png) [@Jonatas\_Baldin](https://forum.ansible.com/u/Jonatas_Baldin)\
**Post date:** [January 25, 2016, 4:05pm UTC](https://forum.ansible.com/t/wrong-variable-substituion-in-template/20336/2 "2016-01-25T16:05:15Z")

</div>

Btw, I already got what was happen.

I was trusting the inventory file generated by Vagrant, but it was messing around with the SSH ports, and every time I created the environment it, it was changed.  
Just bind the private\_network IP address on the inventory file and it is working like a charm!
