]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/mediawiki/providers/site.rb
Qualify property access
[chef.git] / cookbooks / mediawiki / providers / site.rb
index 7c5792aa04decf24420ce34acdddf64eb44c76cf..f637271cad398038b5b33024d3cdfcab00e97fcf 100644 (file)
@@ -62,7 +62,7 @@ action :create do
     not_if do
       ::File.exist?("#{mediawiki_directory}/LocalSettings-install.php")
     end
-    notifies :create, "ruby_block[rename-installer-localsettings]", :immediately
+    notifies :run, "ruby_block[rename-installer-localsettings]", :immediately
   end
 
   execute "#{mediawiki_directory}/maintenance/update.php" do
@@ -108,7 +108,7 @@ action :create do
 
   # Safety catch if git doesn't update but install.php hasn't run
   ruby_block "catch-installer-localsettings-run" do
-    action :create
+    action :run
     block do
       #
     end
@@ -276,6 +276,7 @@ action :create do
 
   mediawiki_extension "SyntaxHighlight_GeSHi" do
     site new_resource.name
+    template "mw-ext-SyntaxHighlight.inc.php.erb"
     update_site false
   end
 
@@ -292,13 +293,13 @@ action :create do
 
   # MediaWiki Language Extension Bundle
   # FIXME: should automatically resolve tag
-  mw_lang_ext_bundle_tag = "2016.10"
+  mw_lang_ext_bundle_tag = "2017.01"
 
   mediawiki_extension "Babel" do
     site new_resource.name
     template "mw-ext-Babel.inc.php.erb"
     # tag mw_lang_ext_bundle_tag
-    reference "740782459d34e756a932ea1ceddde432a1295197"
+    tag mw_lang_ext_bundle_tag
     update_site false
   end
 
@@ -454,15 +455,19 @@ action :create do
 
   ports = new_resource.ssl_enabled ? [80, 443] : [80]
 
+  ssl_certificate new_resource.name do
+    domains [new_resource.name] + Array(new_resource.aliases)
+    only_if { new_resource.ssl_enabled }
+  end
+
   apache_site new_resource.name do
     cookbook "mediawiki"
     template "apache.erb"
     directory site_directory
     variables :aliases => Array(new_resource.aliases),
               :private => new_resource.private,
-              :ports => ports,
-              :ssl_certificate => new_resource.ssl_certificate,
-              :ssl_certificate_chain => new_resource.ssl_certificate_chain
+              :ssl_enabled => new_resource.ssl_enabled,
+              :ports => ports
     reload_apache false
   end