Skip to content

Commit

Permalink
#279 only add stubs if conf.d exists and don't delete it ourselves
Browse files Browse the repository at this point in the history
  • Loading branch information
svanzoest committed Apr 12, 2017
1 parent e286e02 commit 4e053c9
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 5 deletions.
5 changes: 0 additions & 5 deletions recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@
end
end

directory "#{node['apache']['dir']}/conf.d" do
action :delete
recursive true
end

directory node['apache']['log_dir'] do
mode '0755'
recursive true
Expand Down
1 change: 1 addition & 0 deletions recipes/mod_apreq2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@

file "#{node['apache']['dir']}/conf.d/apreq.conf" do
content '# conf is under mods-available/apreq.conf - apache2 cookbook\n'
only_if { ::Dir.exist?("#{node['apache']['dir']}/conf.d") }
end

apache_module 'apreq'
1 change: 1 addition & 0 deletions recipes/mod_auth_cas.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@

file "#{node['apache']['dir']}/conf.d/auth_cas.conf" do
content '# conf is under mods-available/auth_cas.conf - apache2 cookbook\n'
only_if { ::Dir.exist?("#{node['apache']['dir']}/conf.d") }
end
end
end
Expand Down
1 change: 1 addition & 0 deletions recipes/mod_fcgid.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

file "#{node['apache']['dir']}/conf.d/fcgid.conf" do
content '# conf is under mods-available/fcgid.conf - apache2 cookbook\n'
only_if { ::Dir.exist?("#{node['apache']['dir']}/conf.d") }
end

# CentOS 7 (and recent Fedoras) have Apache 2.4, where FCGI socket path
Expand Down
1 change: 1 addition & 0 deletions recipes/mod_perl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@

file "#{node['apache']['dir']}/conf.d/perl.conf" do
content '# conf is under mods-available/perl.conf - apache2 cookbook\n'
only_if { ::Dir.exist?("#{node['apache']['dir']}/conf.d") }
end

apache_module 'perl'
1 change: 1 addition & 0 deletions recipes/mod_php.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
when 'rhel', 'fedora', 'suse', 'amazon'
file "#{node['apache']['dir']}/conf.d/php.conf" do
content '# conf is under mods-available/php.conf - apache2 cookbook\n'
only_if { ::Dir.exist?("#{node['apache']['dir']}/conf.d") }
end
end

Expand Down
1 change: 1 addition & 0 deletions recipes/mod_python.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@

file "#{node['apache']['dir']}/conf.d/python.conf" do
content '# conf is under mods-available/python.conf - apache2 cookbook\n'
only_if { ::Dir.exist?("#{node['apache']['dir']}/conf.d") }
end

apache_module 'python'
1 change: 1 addition & 0 deletions recipes/mod_ssl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

file "#{node['apache']['dir']}/conf.d/ssl.conf" do
content '# SSL Conf is under mods-available/ssl.conf - apache2 cookbook\n'
only_if { ::Dir.exist?("#{node['apache']['dir']}/conf.d") }
end
end

Expand Down
1 change: 1 addition & 0 deletions recipes/mod_wsgi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

file "#{node['apache']['dir']}/conf.d/wsgi.conf" do
content '# conf is under mods-available/wsgi.conf - apache2 cookbook\n'
only_if { ::Dir.exist?("#{node['apache']['dir']}/conf.d") }
end

apache_module 'wsgi'
1 change: 1 addition & 0 deletions recipes/mod_xsendfile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

file "#{node['apache']['dir']}/conf.d/xsendfile.conf" do
content '# conf is under mods-available/xsendfile.conf - apache2 cookbook\n'
only_if { ::Dir.exist?("#{node['apache']['dir']}/conf.d") }
end

apache_module 'xsendfile'

0 comments on commit 4e053c9

Please sign in to comment.