# Problem: blockinfile with create=yes creates a file with no ending newline

**URL:** <https://forum.ansible.com/t/problem-blockinfile-with-create-yes-creates-a-file-with-no-ending-newline/22037>\
**Category:** Ansible Project\
**Created:** [July 18, 2016, 12:08am UTC](https://forum.ansible.com/t/problem-blockinfile-with-create-yes-creates-a-file-with-no-ending-newline/22037 "2016-07-18T00:08:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kayvan\_Sylvan](https://avatars.discourse-cdn.com/v4/letter/k/4da419/32.png) [@Kayvan\_Sylvan](https://forum.ansible.com/u/Kayvan_Sylvan)\
**Post date:** [July 18, 2016, 12:08am UTC](https://forum.ansible.com/t/problem-blockinfile-with-create-yes-creates-a-file-with-no-ending-newline/22037/1 "2016-07-18T00:08:26Z")

</div>

Hi everyone,

This snippet:

# Test blockinfle create

- name: Testing /tmp/foo  
blockinfile: dest=/tmp/foo create=yes block=‘My Content’  
become: false

Creates /tmp/foo with no ending newline after the END marker:

> **$ cat /tmp/foo**
> 
> # BEGIN ANSIBLE MANAGED BLOCK
> 
> My Content
> 
> # END ANSIBLE MANAGED BLOCK] **$**

Any suggestions?

—Kayvan
