Wrong variable substituion in template

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:

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!