On 30. okt. 2017 19:30, Dave wrote:
>     - name: Add more block data to test config file
>       blockinfile:
>         dest: "/var/www/html/{{ set_newsite }}.cfg"
>         insertafter: EOF
>         block: |
>            test4
>            test5
>            test6
> 
> It's a simple script that adds lines in a test config file to ensure the
> basics work before I add code to it. When I edit out the second
> 'blockinfile' command, I get everything before the word 'test4', so I'm
> definitely seeing something is up.

When using several blockinfile on same file it's essential that you set unique 
marker for each blockinfile, if not the second one will overwrite the first one.

-- 
Kai Stian Olstad

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/6ceaa4b1-2f2f-2492-fd04-d9e4d0a11b58%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to