This worked for me:
file_line { 'remove ':
ensure => absent,
path => '/path/to/file.conf',
match => 'some (regexp) part of a given line',
match_for_absence => true,
line => '',
}
Note how the 'line' attribute is still there but null (nothing between 2
s
On 2/25/15 10:56 AM, Martin Alfke wrote:
> The single quotes take the argument as it is.
> In this case you are looking for a line with *xyz*
> Maybe you want to try double quotes.
>
> hth,
>
> Martin
>
> On 25 Feb 2015, at 13:58, Andreas Dvorak wrote:
>
>> Dear all
>>
>> I would like to use t
The single quotes take the argument as it is.
In this case you are looking for a line with *xyz*
Maybe you want to try double quotes.
hth,
Martin
On 25 Feb 2015, at 13:58, Andreas Dvorak wrote:
> Dear all
>
> I would like to use the stdlib Modul with file_line to delete a line that
> matches
Dear all
I would like to use the stdlib Modul with file_line to delete a line that
matches *xyz*.
But the resource
file_line {'delete line':
ensure => absent,
path => '/etc/file',
line => '*xyz*',
}
or
file_line {'delete line':
ensure => absent,
path => '/etc/file',
match =>