Skip to content

Commit cdbce5c

Browse files
author
nathenharvey
committed
[COOK-3769] Uncomment the enabling of apache modules and fix the not_if test
The `apache_module` should be able to enable modules
1 parent 3e202cf commit cdbce5c

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

definitions/apache_module.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@
3333
end
3434

3535
if params[:enable]
36-
# execute "a2enmod #{params[:name]}" do
37-
# command "/usr/sbin/a2enmod #{params[:name]}"
38-
# notifies :restart, 'service[apache2]'
39-
# not_if do
40-
# ::File.symlink?("#{node['apache']['dir']}/mods-enabled/#{params[:name]}.load") &&
41-
# ::File.exists?("#{node['apache']['dir']}/mods-available/#{params[:name]}.conf") ? ::File.symlink?("#{node['apache']['dir']}/mods-enabled/#{params[:name]}.conf") : true
42-
# end
43-
# end
36+
execute "a2enmod #{params[:name]}" do
37+
command "/usr/sbin/a2enmod #{params[:name]}"
38+
notifies :restart, 'service[apache2]'
39+
not_if do
40+
::File.symlink?("#{node['apache']['dir']}/mods-enabled/#{params[:name]}.load") &&
41+
(::File.exists?("#{node['apache']['dir']}/mods-available/#{params[:name]}.conf") ? ::File.symlink?("#{node['apache']['dir']}/mods-enabled/#{params[:name]}.conf") : true)
42+
end
43+
end
4444
else
4545
execute "a2dismod #{params[:name]}" do
4646
command "/usr/sbin/a2dismod #{params[:name]}"

0 commit comments

Comments
 (0)