summaryrefslogtreecommitdiff
path: root/lib/puppet
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-01-26 13:04:42 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-01-26 13:04:42 -0200
commitce9a3a152fc180e2de297367ea1a87477eae9338 (patch)
tree967ac44bab63a89f07c3ce5b09f721e6befaa718 /lib/puppet
parente51113be291e2c30088d9b25e9e279d9f3a675e1 (diff)
downloadpuppet-mysql-ce9a3a152fc180e2de297367ea1a87477eae9338.tar.gz
puppet-mysql-ce9a3a152fc180e2de297367ea1a87477eae9338.tar.bz2
More lib updates
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/provider/mysql_user/mysql.rb4
-rw-r--r--lib/puppet/type/mysql_database.rb3
-rw-r--r--lib/puppet/type/mysql_user.rb3
3 files changed, 8 insertions, 2 deletions
diff --git a/lib/puppet/provider/mysql_user/mysql.rb b/lib/puppet/provider/mysql_user/mysql.rb
index e04d7e6..3051681 100644
--- a/lib/puppet/provider/mysql_user/mysql.rb
+++ b/lib/puppet/provider/mysql_user/mysql.rb
@@ -1,8 +1,8 @@
require 'puppet/provider/package'
Puppet::Type.type(:mysql_user).provide(:mysql,
- # T'is funny business, this code is quite generic
- :parent => Puppet::Provider::Package) do
+ # T'is funny business, this code is quite generic
+ :parent => Puppet::Provider::Package) do
desc "Use mysql as database."
commands :mysql => '/usr/bin/mysql'
diff --git a/lib/puppet/type/mysql_database.rb b/lib/puppet/type/mysql_database.rb
index b01bb83..0ba929f 100644
--- a/lib/puppet/type/mysql_database.rb
+++ b/lib/puppet/type/mysql_database.rb
@@ -1,7 +1,10 @@
# This has to be a separate type to enable collecting
Puppet::Type.newtype(:mysql_database) do
@doc = "Manage a database."
+
ensurable
+ autorequire(:service) { 'mysql' }
+
newparam(:name) do
desc "The name of the database."
diff --git a/lib/puppet/type/mysql_user.rb b/lib/puppet/type/mysql_user.rb
index 55d97b6..0b7e9af 100644
--- a/lib/puppet/type/mysql_user.rb
+++ b/lib/puppet/type/mysql_user.rb
@@ -1,7 +1,10 @@
# This has to be a separate type to enable collecting
Puppet::Type.newtype(:mysql_user) do
@doc = "Manage a database user."
+
ensurable
+ autorequire(:service) { 'mysqld' }
+
newparam(:name) do
desc "The name of the user. This uses the 'username@hostname' form."