Files
puppet-heat/manifests/db/mysql/host_access.pp
2013-05-30 15:20:11 +02:00

31 lines
652 B
Puppet

# Allow a user to access the heat database
#
# == Namevar
# The host to allow
#
# == Parameters
# [*user*]
# username to allow
#
# [*password*]
# user password
#
# [*database*]
# the database name
#
define heat::db::mysql::host_access ($user, $password, $database) {
database_user { "${user}@${name}":
password_hash => mysql_password($password),
provider => 'mysql',
require => Database[$database],
}
database_grant { "${user}@${name}/${database}":
# TODO figure out which privileges to grant.
privileges => 'all',
provider => 'mysql',
require => Database_user["${user}@${name}"]
}
}