I want ansible to comment-out all lines in a file, if they aren't already
commented out. Here's what I have:
replace: dest=/etc/httpd/conf.d/welcome.conf regexp='(^[^#].*)' replace='# \1'
The problem is, the file has some blank lines. When ansible encounters a blank
line, it comments it out, an
I'm thinking the problem is that it is allowing any character to match [^#]
--- including newline, which you likely do not expect. Try [^#\n] instead.
On Fri, Nov 6, 2015 at 5:45 PM, Edward Ned Harvey (lopser) <
lop...@nedharvey.com> wrote:
> I want ansible to comment-out all lines in a file, if
> From: Brandon Allbery [mailto:allber...@gmail.com]
>
> I'm thinking the problem is that it is allowing any character to match [^#]
> ---
> including newline, which you likely do not expect. Try [^#\n] instead.
Thanks, that worked. But I'm still going to have to conclude that it's a bug,
becau