Skip to content

Commit 2bb3751

Browse files
authored
Merge pull request #993 from jhriggs/ticket/MODULES-5618
(MODULES-5618) Hide logging of password_hash changes in mysql::user
2 parents 69ea05a + 03f754a commit 2bb3751

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

lib/puppet/type/mysql_user.rb

+14
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,20 @@
4646
newproperty(:password_hash) do
4747
desc 'The password hash of the user. Use mysql_password() for creating such a hash.'
4848
newvalue(%r{\w*})
49+
50+
def change_to_s(currentvalue, _newvalue)
51+
(currentvalue == :absent) ? 'created password' : 'changed password'
52+
end
53+
54+
# rubocop:disable Style/PredicateName
55+
def is_to_s(_currentvalue)
56+
'[old password hash redacted]'
57+
end
58+
# rubocop:enable Style/PredicateName
59+
60+
def should_to_s(_newvalue)
61+
'[new password hash redacted]'
62+
end
4963
end
5064

5165
newproperty(:plugin) do

0 commit comments

Comments
 (0)