marker of module blockinfile

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 !! :wink:

Regards,