Merge "Add debian package for puppet-stdlib-5.0.0"

This commit is contained in:
Zuul 2021-10-25 19:23:05 +00:00 committed by Gerrit Code Review
commit cd3a27ff27
3 changed files with 47 additions and 0 deletions

View File

@ -0,0 +1,10 @@
---
debname: puppet-module-puppetlabs-stdlib
debver: 5.0.0-1
dl_path:
name: puppet-module-puppetlabs-stdlib-5.0.0-1.tar.gz
url: https://salsa.debian.org/puppet-team/puppet-module-puppetlabs-stdlib/-/archive/debian/5.0.0-1/puppet-module-puppetlabs-stdlib-debian-5.0.0-1.tar.gz
md5sum: 4d3cd229312a12f64a434495011aee7c
revision:
dist: $STX_DIST
PKG_GITREVCOUNT: true

View File

@ -0,0 +1,36 @@
From d95ec2abaa68a1da308c3c8b01c700fcc544a788 Mon Sep 17 00:00:00 2001
From: Don Penney <don.penney@windriver.com>
Date: Mon, 1 May 2017 14:37:22 -0400
Subject: [PATCH] Filter password in logs
---
lib/puppet/parser/functions/ensure_resource.rb | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/puppet/parser/functions/ensure_resource.rb b/lib/puppet/parser/functions/ensure_resource.rb
index 1ba6a44..b9c3242 100644
--- a/lib/puppet/parser/functions/ensure_resource.rb
+++ b/lib/puppet/parser/functions/ensure_resource.rb
@@ -30,15 +30,17 @@ ENDOFDOC
raise(ArgumentError, 'Must specify a type') unless type
raise(ArgumentError, 'Must specify a title') unless title
params ||= {}
+ filtered_params = Marshal.load(Marshal.dump(params)) # deep copy
+ filtered_params.delete("password")
items = [title].flatten
items.each do |item|
Puppet::Parser::Functions.function(:defined_with_params)
if function_defined_with_params(["#{type}[#{item}]", params])
- Puppet.debug("Resource #{type}[#{item}] with params #{params} not created because it already exists")
+ Puppet.debug("Resource #{type}[#{item}] with params #{filtered_params} not created because it already exists")
else
- Puppet.debug("Create new resource #{type}[#{item}] with params #{params}")
+ Puppet.debug("Create new resource #{type}[#{item}] with params #{filtered_params}")
Puppet::Parser::Functions.function(:create_resources)
function_create_resources([type.capitalize, { item => params }])
end
--
1.8.3.1

View File

@ -0,0 +1 @@
0001-Filter-password-in-logs.patch