diff options
author | root <root@puppetmaster.black.co.at> | 2007-10-18 11:54:23 +0200 |
---|---|---|
committer | root <root@puppetmaster.black.co.at> | 2007-10-18 11:54:23 +0200 |
commit | ee94a2a56c73dc54439b34a58320c8c233ccdbd7 (patch) | |
tree | 1b3bd95539cf891c4f8e3d8fd78f1077a20b9f8a /plugins/puppet/provider/mysql_grant/mysql.rb | |
parent | 813025c80066504345e72ead609075751fbc5b80 (diff) | |
download | puppet-mysql-ee94a2a56c73dc54439b34a58320c8c233ccdbd7.tar.gz puppet-mysql-ee94a2a56c73dc54439b34a58320c8c233ccdbd7.tar.xz puppet-mysql-ee94a2a56c73dc54439b34a58320c8c233ccdbd7.zip |
mysql: flush privileges, autorequire, minor adjustments
This commit executes a mysqladmin flush-privileges after every modification
of users or grants, thereby enabling mysql to actually look at the changes too.
grants now autorequire the appropriate db and user
adjustet my site.pp for new types
Diffstat (limited to 'plugins/puppet/provider/mysql_grant/mysql.rb')
-rw-r--r-- | plugins/puppet/provider/mysql_grant/mysql.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/puppet/provider/mysql_grant/mysql.rb b/plugins/puppet/provider/mysql_grant/mysql.rb index 9d900ec..93d7ecf 100644 --- a/plugins/puppet/provider/mysql_grant/mysql.rb +++ b/plugins/puppet/provider/mysql_grant/mysql.rb @@ -10,6 +10,11 @@ Puppet::Type.type(:mysql_grant).provide(:mysql) do desc "Uses mysql as database." commands :mysql => '/usr/bin/mysql' + commands :mysqladmin => '/usr/bin/mysqladmin' + + def mysql_flush + mysqladmin "flush-privileges" + end # this parses the def split_name(string) @@ -44,6 +49,7 @@ Puppet::Type.type(:mysql_grant).provide(:mysql) do name[:host], name[:user], name[:db], ] end + mysql_flush end end @@ -129,6 +135,7 @@ Puppet::Type.type(:mysql_grant).provide(:mysql) do stmt = stmt << set << where mysql "mysql", "-Be", stmt + mysql_flush end end |