Fix a bug preventing nginx from being reloaded after generating a cert

Change the notifies property to :immediately in nginx_certbot_site. This
way the vhost template is recreated and then triggers a reload of the
nginx service. The previous code resulted in nginx not being reloaded,
as the action had already been queued earlier.
This commit is contained in:
Greg Karékinian
2019-11-22 14:37:29 +01:00
parent 529a4fc4a8
commit db4e2777d4
2 changed files with 2 additions and 2 deletions

View File

@@ -47,6 +47,6 @@ action :create do
::File.exist?("#{node['nginx']['dir']}/sites-enabled/#{domain}_certbot") &&
!::File.exist?("/etc/letsencrypt/live/#{domain}/fullchain.pem")
end
notifies :create, "template[#{node['nginx']['dir']}/sites-available/#{site}]", :delayed
notifies :create, "template[#{node['nginx']['dir']}/sites-available/#{site}]", :immediately
end
end