From 7ac5982b5c3697951435e82dbeb6030d5915fa51 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mathieu=20Gagne=CC=81?= Date: Sun, 21 Apr 2013 17:29:06 -0400 Subject: [PATCH] Fix various puppet-lint errors and warnings --- manifests/db/mysql.pp | 3 ++- manifests/db/mysql/host_access.pp | 13 ++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) 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}"] } } -- 2.45.2