# marker of module blockinfile

**URL:** <https://forum.ansible.com/t/marker-of-module-blockinfile/30669>\
**Category:** Ansible Project\
**Created:** [June 27, 2019, 4:10pm UTC](https://forum.ansible.com/t/marker-of-module-blockinfile/30669 "2019-06-27T16:10:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ryad9200000](https://avatars.discourse-cdn.com/v4/letter/r/f04885/32.png) [@ryad9200000](https://forum.ansible.com/u/ryad9200000)\
**Post date:** [June 27, 2019, 4:10pm UTC](https://forum.ansible.com/t/marker-of-module-blockinfile/30669/1 "2019-06-27T16:10:48Z")

</div>

Hy,

I don’t understand why when i use marker only or marker\_begin or marker\_end, Ansible put all time on marker in the beginning **and** the end alo …

One exemple :

- name: Inserer clepub dans authorized\_key  
blockinfile:  
block: “{{ lookup(‘file’, ‘{{ role\_path }}/files/keys/{{ nom\_appli }}.key’) }}”  
dest: ‘/home/{{ nv\_user }}/.ssh/authorized\_keys’  
marker: “#CLE APPLICATIVE {{nom\_appli}} DE {{ nv\_user }}@{{ nv\_host }}”

Same when i use marker\_begin and marker\_end ansible put all time one marker in the beginning **and** at the end of my file why ?

I want only marker in the beginning of my file !

Can you help me please ???

Thanks community ansible !! 😉

Regards,
