X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/a85b3b842096a7a10bb6f3a89daf238af1b852c6..5f13b21c83e1181dbc494b36fd4a06a07711e0ac:/cookbooks/otrs/recipes/default.rb?ds=inline diff --git a/cookbooks/otrs/recipes/default.rb b/cookbooks/otrs/recipes/default.rb index ef4e9b388..ab7093ea9 100644 --- a/cookbooks/otrs/recipes/default.rb +++ b/cookbooks/otrs/recipes/default.rb @@ -47,12 +47,7 @@ database_name = node[:otrs][:database_name] database_user = node[:otrs][:database_user] database_password = passwords[node[:otrs][:database_password]] site = node[:otrs][:site] - -old_installation = begin - File.readlink("/opt/otrs") - rescue StandardError - nil - end +site_aliases = node[:otrs][:site_aliases] || [] postgresql_user database_user do cluster database_cluster @@ -96,27 +91,6 @@ file "/opt/otrs-#{version}/Kernel/Config.pm" do content config end -generic_agent = edit_file "/opt/otrs-#{version}/Kernel/Config/GenericAgent.pm.dist" do |line| - line -end - -file "/opt/otrs-#{version}/Kernel/Config/GenericAgent.pm" do - owner user - group "www-data" - mode 0o664 - content generic_agent -end - -link "/opt/otrs-#{version}/Kernel/Config/Files/ZZZAuto.pm" do - to "#{old_installation}/Kernel/Config/Files/ZZZAuto.pm" - link_type :hard -end - -link "/opt/otrs-#{version}/var/log/TicketCounter.log" do - to "#{old_installation}/var/log/TicketCounter.log" - link_type :hard -end - link "/opt/otrs" do to "/opt/otrs-#{version}" end @@ -157,12 +131,13 @@ Dir.glob("/opt/otrs/var/cron/*.dist") do |distname| end ssl_certificate site do - domains site + domains [site] + site_aliases notifies :reload, "service[apache2]" end apache_site site do template "apache.erb" + variables :aliases => site_aliases end template "/etc/sudoers.d/otrs" do