# Whitespace in Value for INI\_FILE

**URL:** <https://forum.ansible.com/t/whitespace-in-value-for-ini-file/18254>\
**Category:** Ansible Project\
**Created:** [May 18, 2015, 6:32pm UTC](https://forum.ansible.com/t/whitespace-in-value-for-ini-file/18254 "2015-05-18T18:32:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tim\_Jabaut](https://avatars.discourse-cdn.com/v4/letter/t/eada6e/32.png) [@Tim\_Jabaut](https://forum.ansible.com/u/Tim_Jabaut)\
**Post date:** [May 18, 2015, 6:32pm UTC](https://forum.ansible.com/t/whitespace-in-value-for-ini-file/18254/1 "2015-05-18T18:32:53Z")

</div>

I have a problem when using the ini\_file module as follows:

---

<div class="post-metadata">

**Author:** ![vaida.dan](https://avatars.discourse-cdn.com/v4/letter/v/5daacb/32.png) [@vaida.dan](https://forum.ansible.com/u/vaida.dan)\
**Post date:** [November 28, 2015, 9:54am UTC](https://forum.ansible.com/t/whitespace-in-value-for-ini-file/18254/2 "2015-11-28T09:54:52Z")

</div>

Try this:

`

- name: Create ‘config.ini’ to include necessary values  
ini\_file: \>  
dest=./testconfig.ini  
section=“{{ item.section }}”  
option=“{{ item.option }}”  
value=“{{ item.value }}”  
with\_items:
- { section: ‘General’, option: ‘test1’, value: ‘value2’ }
- { section: ‘General2’, option: ‘test2’, value: 2 }
- { section: ‘General3’, option: ‘test3’, value: ‘This is a test’ }

`
