[Puppet Users] delete line in file with substring xyz

10 views
Skip to first unread message

Khalid J Hosein

unread,
May 6, 2017, 2:42:14 PM5/6/17
to puppet...@googlegroups.com
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 single quotes).
HTH!

 -- Khalid
Reply all
Reply to author
Forward
0 new messages