X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/fb1f1d56e8d8a6a86b79c71546e6c114fec2640c..a661370166bbac0bbe8c8b1f0ba947e3a269edee:/cookbooks/mysql/providers/user.rb diff --git a/cookbooks/mysql/providers/user.rb b/cookbooks/mysql/providers/user.rb index 05fd01eb8..c2f5e58d2 100644 --- a/cookbooks/mysql/providers/user.rb +++ b/cookbooks/mysql/providers/user.rb @@ -17,12 +17,14 @@ # limitations under the License. # +use_inline_resources + def load_current_resource @mysql = Chef::MySQL.new @current_resource = Chef::Resource::MysqlUser.new(new_resource.name) @current_resource.user(new_resource.user) - if mysql_user = @mysql.users[@current_resource.user] + if (mysql_user = @mysql.users[@current_resource.user]) Chef::MySQL::USER_PRIVILEGES.each do |privilege| @current_resource.send(privilege, mysql_user[privilege]) end