# limitations under the License.
#
-define :mediawiki_site, :action => [ :create, :enable ] do
+define :mediawiki_site, :action => [:create, :enable] do
name = params[:name]
# /etc/cron.d names cannot contain a dot
group node[:mediawiki][:group]
end
- directory "#{site_directory}" do
+ directory site_directory do
owner node[:mediawiki][:user]
group node[:mediawiki][:group]
mode 0775
end
- directory "#{mediawiki[:directory]}" do
+ directory mediawiki[:directory] do
owner node[:mediawiki][:user]
group node[:mediawiki][:group]
mode 0775
end
- git "#{mediawiki[:directory]}" do
+ git mediawiki[:directory] do
action :sync
repository mediawiki_repository
reference mediawiki_reference
# depth 1
user node[:mediawiki][:user]
group node[:mediawiki][:group]
- notifies :run, resources(:execute => "#{mediawiki[:directory]}/maintenance/install.php"), :immediately
- notifies :run, resources(:execute => "#{mediawiki[:directory]}/maintenance/update.php")
+ notifies :run, "execute[#{mediawiki[:directory]}/maintenance/install.php]", :immediately
+ notifies :run, "execute[#{mediawiki[:directory]}/maintenance/update.php]"
end
# Safety catch if git doesn't update but install.php hasn't run
not_if do
File.exist?("#{mediawiki[:directory]}/LocalSettings-install.php")
end
- notifies :run, resources(:execute => "#{mediawiki[:directory]}/maintenance/install.php"), :immediately
+ notifies :run, "execute[#{mediawiki[:directory]}/maintenance/install.php]", :immediately
action :create
end
group node[:mediawiki][:group]
mode 0664
variables :name => name, :database_params => database_params, :mediawiki => mediawiki
- notifies :run, resources(:execute => "#{mediawiki[:directory]}/maintenance/update.php")
+ notifies :run, "execute[#{mediawiki[:directory]}/maintenance/update.php]"
end
template "/etc/cron.d/mediawiki-#{cron_name}" do