fuel-library/deployment/puppet/ceilometer/manifests/db/mysql/host_access.pp
Roman Sokolkov 1743c7e76b Ceilometer integration
* BP: ceilometer-fuel-integraition
  * HA and simple deployment
  * general MySQL backend for ceilometer
  * tested on CentOS 6.4
  * need verification of Ubuntu support
2013-11-14 21:25:46 +04:00

31 lines
664 B
Puppet

# Allow a user to access the ceilometer database
#
# == Namevar
# The host to allow
#
# == Parameters
# [*user*]
# username to allow
#
# [*password*]
# user password
#
# [*database*]
# the database name
#
define ceilometer::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}"]
}
}