puppet-glance/manifests/db/mysql.pp
Mathieu Gagné d5567e6aef Various Puppet lint fixes
* Fix following warnings:
    * double quoted string containing no variables
    * indentation of => is not properly aligned
    * quoted boolean value found
    * variable not enclosed in {}
* Fix following errors:
    * two-space soft tabs not used
* Remove quotes around class in include/require statements
* Remove some comments from the code, they added no value

Change-Id: I341b37f2c6795951f3285037b2fa612d767a4474
2013-07-01 17:34:19 -04:00

38 lines
921 B
Puppet

#
# I should change this to mysql
# for consistency
#
class glance::db::mysql(
$password,
$dbname = 'glance',
$user = 'glance',
$host = '127.0.0.1',
$allowed_hosts = undef,
$charset = 'latin1',
$cluster_id = 'localzone'
) {
Class['mysql::server'] -> Class['glance::db::mysql']
Class['glance::db::mysql'] -> Exec<| title == 'glance-manage db_sync' |>
Database[$dbname] ~> Exec<| title == 'glance-manage db_sync' |>
require mysql::python
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
glance::db::mysql::host_access { $allowed_hosts:
user => $user,
password => $password,
database => $dbname,
}
}
}