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