This repository was archived by the owner on Jul 25, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 55
Deleting a module should not delete mods-available directory #115
Copy link
Copy link
Open
Labels
Description
Cookbook version
0.4.5
Chef-client version
12.21.1
Platform Details
Ubuntu 16.04
Scenario:
Remove an existing module without deleting /etc/apache2-some-name/mods-available directory.
Steps to Reproduce:
# metadata.rb
...
depends 'httpd', '~> 0.4.5'
# recipes/default.rb
httpd_service 'sample_app_demo' do
listen_ports ['8082']
action [:create, :start]
run_user 'sample_app'
run_group 'sample_app'
end
httpd_module 'passenger' do
action :create
instance 'sample_app_demo'
notifies :restart, 'httpd_service[sample_app_demo]'
end
kitchen converge
# recipes/default.rb
httpd_service 'sample_app_demo' do
listen_ports ['8082']
action [:create, :start]
run_user 'sample_app'
run_group 'sample_app'
end
httpd_module 'passenger' do
action :delete
instance 'sample_app_demo'
notifies :restart, 'httpd_service[sample_app_demo]'
end
kitchen converge
Expected Result:
# httpd/libraries/httpd_module_debian.rb
...
action :delete do
link "/etc/#{apache_name}/mods-enabled/#{module_name}.load" do
action :delete
end
file "/etc/#{apache_name}/mods-available/#{module_name}.load" do
action :delete
end
end
...
Actual Result:
# httpd/libraries/httpd_module_debian.rb
...
action :delete do
directory "/etc/#{apache_name}/mods-available" do
recursive true
action :delete
end
file "/etc/#{apache_name}/mods-available/#{module_name}.load" do
action :delete
end
link "/etc/#{apache_name}/mods-enabled/#{module_name}.load" do
action :delete
end
end
...
Reactions are currently unavailable