Skip to content

Commit 45ddf36

Browse files
authored
fix: ignore postgresql_conf resource value when set to absent (#1657)
* fix: use stricter regex to only match the exact config parameter name
1 parent 8aa4f50 commit 45ddf36

File tree

1 file changed

+1
-1
lines changed
  • lib/puppet/provider/postgresql_conf

1 file changed

+1
-1
lines changed

lib/puppet/provider/postgresql_conf/ruby.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def exists?
8080

8181
# remove resource if exists and is set to absent
8282
def destroy
83-
entry_regex = %r{#{resource[:key]}.*=.*#{resource[:value]}}
83+
entry_regex = %r{^\s*#{resource[:key]}\s*=}
8484
lines = File.readlines(resource[:target])
8585

8686
lines.delete_if do |entry|

0 commit comments

Comments
 (0)