From: Tom Hughes Date: Mon, 11 Mar 2024 17:41:32 +0000 (+0000) Subject: Actively disable mod_evasive when necessary X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/c1e6343a081a3a989311deee09ecc66ba78a78f4 Actively disable mod_evasive when necessary --- diff --git a/cookbooks/apache/recipes/default.rb b/cookbooks/apache/recipes/default.rb index 57d801903..b440dc388 100644 --- a/cookbooks/apache/recipes/default.rb +++ b/cookbooks/apache/recipes/default.rb @@ -79,9 +79,14 @@ apache_module "status" do variables :hosts => admins["hosts"] end -apache_module "evasive" do - conf "evasive.conf.erb" - only_if { node[:apache][:evasive] } +if node[:apache][:evasive] + apache_module "evasive" do + conf "evasive.conf.erb" + end +else + apache_module "evasive" do + action :disable + end end apache_module "brotli" do