X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/18e12b0e123fc3e5f344682f884feabc12da0f5a..ca0e23852a9523282075fe78076b2deeca69ee53:/cookbooks/mediawiki/resources/extension.rb diff --git a/cookbooks/mediawiki/resources/extension.rb b/cookbooks/mediawiki/resources/extension.rb index 6dc79ea7e..1803c04f0 100644 --- a/cookbooks/mediawiki/resources/extension.rb +++ b/cookbooks/mediawiki/resources/extension.rb @@ -23,11 +23,13 @@ property :extension, :kind_of => String, :name_attribute => true property :site, :kind_of => String, :required => true property :source, :kind_of => String property :template, :kind_of => String +property :template_cookbook, :kind_of => String, :default => "mediawiki" property :variables, :kind_of => Hash, :default => {} property :version, :kind_of => String property :repository, :kind_of => String property :tag, :kind_of => String property :reference, :kind_of => String +property :compose, :kind_of => [TrueClass, FalseClass], :default => false property :update_site, :kind_of => [TrueClass, FalseClass], :default => true action :create do @@ -65,7 +67,7 @@ action :create do if new_resource.template # ~FC023 declare_resource :template, "#{mediawiki_directory}/LocalSettings.d/Ext-#{new_resource.extension}.inc.php" do - cookbook "mediawiki" + cookbook new_resource.template_cookbook source new_resource.template user node[:mediawiki][:user] group node[:mediawiki][:group] @@ -73,14 +75,22 @@ action :create do variables new_resource.variables end else - extension_script = "#{extension_directory}/#{new_resource.extension}.php" - file "#{mediawiki_directory}/LocalSettings.d/Ext-#{new_resource.extension}.inc.php" do content "