mysql_grant bugfix: remove duplicate privileges and GRANT privilege, otherwise the resource gets changed every puppet run
This commit is contained in:
parent
9de42ac43e
commit
07c3b76eb9
1 changed files with 1 additions and 1 deletions
|
@ -17,7 +17,7 @@ Puppet::Type.newtype(:mysql_grant) do
|
||||||
# Sort the privileges array in order to ensure the comparision in the provider
|
# Sort the privileges array in order to ensure the comparision in the provider
|
||||||
# self.instances method match. Otherwise this causes it to keep resetting the
|
# self.instances method match. Otherwise this causes it to keep resetting the
|
||||||
# privileges.
|
# privileges.
|
||||||
self[:privileges] = Array(self[:privileges]).sort!
|
self[:privileges] = Array(self[:privileges]).map(&:upcase).uniq.reject{|k| k == 'GRANT' or k == 'GRANT OPTION'}.sort!
|
||||||
end
|
end
|
||||||
|
|
||||||
validate do
|
validate do
|
||||||
|
|
Loading…
Reference in a new issue