summaryrefslogtreecommitdiff
path: root/lib/puppet/type/mysql_database.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/type/mysql_database.rb')
-rw-r--r--lib/puppet/type/mysql_database.rb15
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/puppet/type/mysql_database.rb b/lib/puppet/type/mysql_database.rb
index bb25ffa..0ba929f 100644
--- a/lib/puppet/type/mysql_database.rb
+++ b/lib/puppet/type/mysql_database.rb
@@ -1,11 +1,14 @@
# This has to be a separate type to enable collecting
Puppet::Type.newtype(:mysql_database) do
- @doc = "Manage a database."
- ensurable
- newparam(:name) do
- desc "The name of the database."
+ @doc = "Manage a database."
- # TODO: only [[:alnum:]_] allowed
- end
+ ensurable
+ autorequire(:service) { 'mysql' }
+
+ newparam(:name) do
+ desc "The name of the database."
+
+ # TODO: only [[:alnum:]_] allowed
+ end
end