Match multiple consecutive lines in lineinfile

33 views
Skip to first unread message

Phyks

unread,
Jul 16, 2015, 5:44:41 PM7/16/15
to ansible...@googlegroups.com
Hi,

I need to add a specific line after some lines in a config file. Due to
the structure of the file, I have to match several consecutive lines to
ensure the line will go to the right place (and I know about template
and copy, but they won't fit my needs in this case).

My problem is that is seems the regexp argument in Ansible does not
match "\n", contrary to the line argument.

Is there a workaround?

Thanks!
--
Phyks
Reply all
Reply to author
Forward
0 new messages