From: Mathieu Gagné Date: Sun, 21 Apr 2013 21:29:06 +0000 (-0400) Subject: Fix various puppet-lint errors and warnings X-Git-Tag: grizzly-eol~15^2~1^2~2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=7ac5982b5c3697951435e82dbeb6030d5915fa51;p=puppet-modules%2Fpuppet-ceilometer.git Fix various puppet-lint errors and warnings --- diff --git a/manifests/db/mysql.pp b/manifests/db/mysql.pp index 5a03411..64231e0 100644 --- a/manifests/db/mysql.pp +++ b/manifests/db/mysql.pp @@ -1,3 +1,4 @@ +# class ceilometer::db::mysql( $password, $dbname = 'ceilometer', @@ -20,7 +21,7 @@ class ceilometer::db::mysql( } if $allowed_hosts { - ceilometer::db::mysql::host_access { $allowed_hosts: + ceilometer::db::mysql::host_access { $allowed_hosts: user => $user, password => $password, database => $dbname, diff --git a/manifests/db/mysql/host_access.pp b/manifests/db/mysql/host_access.pp index af16da7..863af57 100644 --- a/manifests/db/mysql/host_access.pp +++ b/manifests/db/mysql/host_access.pp @@ -1,13 +1,16 @@ +# define ceilometer::db::mysql::host_access ($user, $password, $database) { + database_user { "${user}@${name}": password_hash => mysql_password($password), - provider => 'mysql', - require => Database[$database], + 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}"] + privileges => 'all', + provider => 'mysql', + require => Database_user["${user}@${name}"] } }