Remove bogus row limit from chef server status view
authorTom Hughes <tom@compton.nu>
Sun, 13 Apr 2014 18:38:13 +0000 (19:38 +0100)
committerTom Hughes <tom@compton.nu>
Sun, 13 Apr 2014 18:38:13 +0000 (19:38 +0100)
cookbooks/chef/recipes/server.rb

index e6fed21..fc0a6ac 100644 (file)
@@ -53,3 +53,15 @@ template "/etc/cron.daily/chef-server-backup" do
   group "root"
   mode 0755
 end
+
+ruby_block "/opt/chef-server/embedded/service/chef-server-webui/app/controllers/status_controller.rb" do
+  block do
+    rc = Chef::Util::FileEdit.new("/opt/chef-server/embedded/service/chef-server-webui/app/controllers/status_controller.rb")
+    rc.search_file_delete(/&rows=20/)
+    rc.write_file
+
+    if rc.file_edited?
+      resources(:execute => "chef-server-reconfigure").run_action(:run)
+    end
+  end
+end