module-mysql/manifests/admin_user.pp

18 lines
386 B
ObjectPascal
Raw Normal View History

2011-10-27 23:28:10 +02:00
define mysql::admin_user(
$ensure = present,
$host = '127.0.0.1',
$password
){
mysql_user{"${name}@${host}":
ensure => $ensure,
password_hash => $password ? {
'trocla' => trocla("mysql_admin-user_${name}",'mysql'),
default => $password,
},
}
mysql_grant{"${name}@${host}":
privileges => 'all',
require => Mysql_user["${name}@${host}"],
}
}