diff options
author | Micah Anderson <micah@riseup.net> | 2012-04-04 12:22:09 -0400 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2012-04-04 12:22:09 -0400 |
commit | db8103b0baff13a82969fa218e344e7707743273 (patch) | |
tree | 382f28dbd49d35ff0895d9e2727f9732bb9c70f1 /lib/puppet/provider/mysql_grant/mysql.rb | |
parent | cc65b6c584fbfe4e8e10f91f03a269910a0926c9 (diff) | |
parent | 64e116cfb5a4247f2e763a3d26354099f3f66f27 (diff) |
Merge remote-tracking branch 'immerda/master'
Conflicts:
manifests/server/munin/default.pp
manifests/server/nagios.pp
Diffstat (limited to 'lib/puppet/provider/mysql_grant/mysql.rb')
-rw-r--r-- | lib/puppet/provider/mysql_grant/mysql.rb | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/lib/puppet/provider/mysql_grant/mysql.rb b/lib/puppet/provider/mysql_grant/mysql.rb index bcf8d6c..4c41e76 100644 --- a/lib/puppet/provider/mysql_grant/mysql.rb +++ b/lib/puppet/provider/mysql_grant/mysql.rb @@ -13,12 +13,21 @@ MYSQL_USER_PRIVS = [ :select_priv, :insert_priv, :update_priv, :delete_priv, :show_view_priv, :create_routine_priv, :alter_routine_priv, :create_user_priv, :trigger_priv ] - -MYSQL_DB_PRIVS = [ :select_priv, :insert_priv, :update_priv, :delete_priv, - :create_priv, :drop_priv, :grant_priv, :references_priv, :index_priv, - :alter_priv, :create_tmp_table_priv, :lock_tables_priv, :create_view_priv, - :show_view_priv, :create_routine_priv, :alter_routine_priv, :execute_priv -] +mysql_version = Facter.value(:mysql_version) +if mysql_version =~ /^5.1/ && mysql_version.split('.').last.to_i >= 6 + MYSQL_DB_PRIVS = [ :select_priv, :insert_priv, :update_priv, :delete_priv, + :create_priv, :drop_priv, :grant_priv, :references_priv, :index_priv, + :alter_priv, :create_tmp_table_priv, :lock_tables_priv, :create_view_priv, + :show_view_priv, :create_routine_priv, :alter_routine_priv, :execute_priv, + :event_priv, :trigger_priv + ] +else + MYSQL_DB_PRIVS = [ :select_priv, :insert_priv, :update_priv, :delete_priv, + :create_priv, :drop_priv, :grant_priv, :references_priv, :index_priv, + :alter_priv, :create_tmp_table_priv, :lock_tables_priv, :create_view_priv, + :show_view_priv, :create_routine_priv, :alter_routine_priv, :execute_priv, + ] +end MYSQL_TABLE_PRIVS = [ :select, :insert, :update, :delete, :create, :drop, :references, :index, :alter |