X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/cf6ffe7eb9032fa7b5295296b6303ce35036a620..ff044920428608b2c04507ad52d6ab52c9d6555f:/cookbooks/mediawiki/definitions/mediawiki_extension.rb?ds=sidebyside diff --git a/cookbooks/mediawiki/definitions/mediawiki_extension.rb b/cookbooks/mediawiki/definitions/mediawiki_extension.rb index 91c311656..f3622dc37 100644 --- a/cookbooks/mediawiki/definitions/mediawiki_extension.rb +++ b/cookbooks/mediawiki/definitions/mediawiki_extension.rb @@ -17,14 +17,14 @@ # limitations under the License. # -define :mediawiki_extension, :action => [ :enable ] do +define :mediawiki_extension, :action => [ :enable ], :variables => {} do name = params[:name] site = params[:site] - site_directory = node[:mediawiki][:sites][site][:site_directory] mediawiki_directory = node[:mediawiki][:sites][site][:directory] extension_directory = "#{mediawiki_directory}/extensions/#{name}" source = params[:source] template = params[:template] + template_variables = params[:variables] if source remote_directory extension_directory do @@ -67,6 +67,7 @@ define :mediawiki_extension, :action => [ :enable ] do user node[:mediawiki][:user] group node[:mediawiki][:group] mode 0664 + variables template_variables notifies :create, resources(:template => "#{mediawiki_directory}/LocalSettings.php") end end @@ -78,6 +79,6 @@ define :mediawiki_extension, :action => [ :enable ] do mode 0664 content " "#{mediawiki_directory}/LocalSettings.php") + notifies :create, resources(:template => "#{mediawiki_directory}/LocalSettings.php") end end