GitLab upgraded to 13.12.4-ee.0 - changelog: https://gitlab.com/gitlab-org/gitlab/blob/master/CHANGELOG-EE.md

Unverified Commit 91d5a1dc authored by Lance Albertson's avatar Lance Albertson Committed by GitHub
Browse files

Add apache namespace for `site_available?` and `site_enabled?` helper methods (#721)



These two methods are conflicting with the Nginx cookbook and need to be named
spaced. Rename them to have `apache_` prefixed.

These methods are only used internally so it shouldn't be a breaking change.
Signed-off-by: default avatarLance Albertson <lance@osuosl.org>
parent 3b50fca8
......@@ -2,6 +2,10 @@
This file is used to list changes made in each version of the apache2 cookbook.
## Unreleased
- Add apache namespace for `site_available?` and `site_enabled?` helper methods
## 8.5.0 (2020-09-22)
- resolved cookstyle error: spec/libraries/default_modules_spec.rb:8:7 refactor: `ChefCorrectness/IncorrectLibraryInjection`
......
......@@ -298,11 +298,11 @@ module Apache2
::File.symlink?("#{apache_dir}/mods-enabled/#{new_resource.name}.load")
end
def site_enabled?(site_name)
def apache_site_enabled?(site_name)
::File.symlink?("#{apache_dir}/sites-enabled/#{site_name}.conf")
end
def site_available?(site_name)
def apache_site_available?(site_name)
::File.exist?("#{apache_dir}/sites-available/#{site_name}.conf")
end
......
......@@ -8,8 +8,8 @@ action :enable do
execute "a2ensite #{new_resource.site_name}" do
command "/usr/sbin/a2ensite #{new_resource.site_name}"
notifies :reload, 'service[apache2]', :delayed
not_if { site_enabled?(new_resource.site_name) }
only_if { site_available?(new_resource.site_name) }
not_if { apache_site_enabled?(new_resource.site_name) }
only_if { apache_site_available?(new_resource.site_name) }
end
end
......@@ -17,7 +17,7 @@ action :disable do
execute "a2dissite #{new_resource.site_name}" do
command "/usr/sbin/a2dissite #{new_resource.site_name}"
notifies :reload, 'service[apache2]', :delayed
only_if { site_enabled?(new_resource.site_name) }
only_if { apache_site_enabled?(new_resource.site_name) }
end
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment