# Retaining double-quotes in resulting file created from template

**URL:** <https://forum.ansible.com/t/retaining-double-quotes-in-resulting-file-created-from-template/22948>\
**Category:** Ansible Project\
**Created:** [November 2, 2016, 8:04pm UTC](https://forum.ansible.com/t/retaining-double-quotes-in-resulting-file-created-from-template/22948 "2016-11-02T20:04:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ZillaYT](https://avatars.discourse-cdn.com/v4/letter/z/4da419/32.png) [@ZillaYT](https://forum.ansible.com/u/ZillaYT)\
**Post date:** [November 2, 2016, 8:04pm UTC](https://forum.ansible.com/t/retaining-double-quotes-in-resulting-file-created-from-template/22948/1 "2016-11-02T20:04:43Z")

</div>

I have a template that does has this line

`host_ip = "http://{{ ansible_default_ipv4.address }}"`

which results into a line in the dest file that has, for example

`  
host\_ip = [http://10.10.10.10](http://10.10.10.10)

`  
However, how do modify the template so I retain the “” in the resulting file, so it looks like this

`host_ip = "http://10.10.10.10"`

---

<div class="post-metadata">

**Author:** ![Uwe\_Sauter](https://avatars.discourse-cdn.com/v4/letter/u/41988e/32.png) [@Uwe\_Sauter](https://forum.ansible.com/u/Uwe_Sauter)\
**Post date:** [November 2, 2016, 8:10pm UTC](https://forum.ansible.com/t/retaining-double-quotes-in-resulting-file-created-from-template/22948/2 "2016-11-02T20:10:46Z")

</div>

Putting single quotes around should solve this.

host\_ip = '"http://{{ ansible\_default\_ipv4.address }}"'

Regards,

&nbsp;&nbsp;Uwe
