database_user gives the wrong deprecation warning
This appears to have been a bad copy/paste error. Reported by @vicinus, this should fix #344
This commit is contained in:
parent
d6e7d5200e
commit
1afa6571fb
1 changed files with 1 additions and 1 deletions
|
@ -7,7 +7,7 @@ Puppet::Type.newtype(:database_user) do
|
|||
newparam(:name, :namevar=>true) do
|
||||
desc "The name of the user. This uses the 'username@hostname' or username@hostname."
|
||||
validate do |value|
|
||||
Puppet.warning("database has been deprecated in favor of mysql_database.")
|
||||
Puppet.warning("database has been deprecated in favor of mysql_user.")
|
||||
# https://dev.mysql.com/doc/refman/5.1/en/account-names.html
|
||||
# Regex should problably be more like this: /^[`'"]?[^`'"]*[`'"]?@[`'"]?[\w%\.]+[`'"]?$/
|
||||
raise(ArgumentError, "Invalid database user #{value}") unless value =~ /[\w-]*@[\w%\.:]+/
|
||||
|
|
Loading…
Reference in a new issue