From ae6dab7c25492f73aaeb354179db832f451b1c2f Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Fri, 30 Dec 2011 12:37:44 -0500 Subject: add column grant to mysql_grant --- lib/puppet/type/mysql_grant.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/puppet/type/mysql_grant.rb') diff --git a/lib/puppet/type/mysql_grant.rb b/lib/puppet/type/mysql_grant.rb index 6bc7533..c6311e5 100644 --- a/lib/puppet/type/mysql_grant.rb +++ b/lib/puppet/type/mysql_grant.rb @@ -5,6 +5,16 @@ Puppet::Type.newtype(:mysql_grant) do #ensurable autorequire(:service) { 'mysqld' } + autorequire :mysql_table do + reqs = [] + matches = self[:name].match(/^([^@]*)@([^\/]*)\/(.+)\/(.+)$/) + unless matches.nil? + reqs << matches[4] + end + # puts "Autoreq: '%s'" % reqs.join(" ") + reqs + end + autorequire :mysql_db do # puts "Starting db autoreq for %s" % self[:name] reqs = [] -- cgit v1.2.3