X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/e050b6df164ed5daf4c90115d65cd1700858cc1c..a4854a36f1643daa8ab352ccdf96b12dab5fb346:/cookbooks/apache/providers/module.rb diff --git a/cookbooks/apache/providers/module.rb b/cookbooks/apache/providers/module.rb index e824a0343..d3f069b7f 100644 --- a/cookbooks/apache/providers/module.rb +++ b/cookbooks/apache/providers/module.rb @@ -24,22 +24,27 @@ end use_inline_resources action :install do - unless installed? - package package_name - end + package package_name unless installed? if new_resource.conf # ~FC023 template available_name("conf") do source new_resource.conf owner "root" group "root" - mode 0644 + mode 0o644 variables new_resource.variables end end end action :enable do + execute "a2enmod-#{new_resource.name}" do + command "a2enmod #{new_resource.name}" + user "root" + group "root" + not_if { ::File.exist?(enabled_name("load")) } + end + link enabled_name("load") do to available_name("load") owner "root"