From f9da592e94f36352d65cb03019ad88cecb05d8d3 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 20 Jun 2010 10:59:57 -0300 Subject: Adding ensure parameter at database::instance --- manifests/subsystems/database.pp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/manifests/subsystems/database.pp b/manifests/subsystems/database.pp index c2d1fc3..445b656 100644 --- a/manifests/subsystems/database.pp +++ b/manifests/subsystems/database.pp @@ -2,18 +2,19 @@ class database { include mysql::server # Database definitions - define instance($password) { + define instance($password, $ensure = present) { mysql_database { "$name": - ensure => present, + ensure => $ensure, } mysql_user { "$name@%": + ensure => $ensure, password_hash => mysql_password($password), - ensure => present, require => Mysql_database["$name"], } mysql_grant { "$name@%/$name": + ensure => $ensure, privileges => all, require => Mysql_user["$name@%"], } -- cgit v1.2.3