aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2010-06-20 10:59:57 -0300
committerSilvio Rhatto <rhatto@riseup.net>2010-06-20 10:59:57 -0300
commitf9da592e94f36352d65cb03019ad88cecb05d8d3 (patch)
tree746cc50819f9141834ed79fd99df2f2f391c479d /manifests
parent703c9ce98495e6532d650d0e7ac55d047e467c2d (diff)
downloadpuppet-nodo-f9da592e94f36352d65cb03019ad88cecb05d8d3.tar.gz
puppet-nodo-f9da592e94f36352d65cb03019ad88cecb05d8d3.tar.bz2
Adding ensure parameter at database::instance
Diffstat (limited to 'manifests')
-rw-r--r--manifests/subsystems/database.pp7
1 files 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@%"],
}