Merge branch 'ticket/11184-wildcard_hostnames'

* ticket/11184-wildcard_hostnames:
  (#11184) Allow wildcards in account host names
This commit is contained in:
Ken Barber 2011-12-05 23:41:10 +00:00
commit 0b07743237
2 changed files with 9 additions and 2 deletions

View file

@ -7,7 +7,7 @@ Puppet::Type.newtype(:database_user) do
newparam(:name) do
desc "The name of the user. This uses the 'username@hostname' or username@hosname."
validate do |value|
unless value =~ /\w+@\w+/
unless value =~ /\w+@[\w%]+/
raise ArgumentError, "Invalid database user #{value}"
end
list = value.split('@')

View file

@ -1,6 +1,8 @@
$mysql_root_pw='password'
class { 'mysql::server':
root_password => 'password',
config_hash => {
root_password => 'password',
}
}
#database_user{['test1@localhost', 'test2@localhost', 'test3@localhost']:
database_user{'redmine@localhost':
@ -14,3 +16,8 @@ database_user{'dan@localhost':
ensure => present,
password_hash => mysql_password('blah')
}
database_user{'dan@%':
ensure => present,
password_hash => mysql_password('blah'),
}