Mathieu Gagné d3bc94f168 Various Puppet lint fixes
* Fixes following warnings:
    * double quoted string containing no variables
    * string containing only a variable
    * variable not enclosed in {}
    * indentation of => is not properly aligned
* Fix following error:
    * two-space soft tabs not used
* Remove some comments from the code, they added no value.

Change-Id: I3165e65e95c3565951077786d2edf77245460c35
2013-07-01 16:09:34 -04:00

34 lines
833 B
Puppet

#
class cinder::db::mysql (
$password,
$dbname = 'cinder',
$user = 'cinder',
$host = '127.0.0.1',
$allowed_hosts = undef,
$charset = 'latin1',
$cluster_id = 'localzone'
) {
Class['mysql::server'] -> Class['cinder::db::mysql']
Class['cinder::db::mysql'] -> Exec<| title == 'cinder-manage db_sync' |>
Database[$dbname] ~> Exec<| title == 'cinder-manage db_sync' |>
mysql::db { $dbname:
user => $user,
password => $password,
host => $host,
charset => $charset,
require => Class['mysql::config'],
}
if $allowed_hosts {
# TODO this class should be in the mysql namespace
cinder::db::mysql::host_access { $allowed_hosts:
user => $user,
password => $password,
database => $dbname,
}
}
}