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:
parent
529a4fc4a8
commit
db4e2777d4
@ -4,7 +4,7 @@ maintainer_email 'mail@kosmos.org'
|
|||||||
license 'MIT'
|
license 'MIT'
|
||||||
description 'Installs/Configures kosmos-nginx'
|
description 'Installs/Configures kosmos-nginx'
|
||||||
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
||||||
version '0.3.1'
|
version '0.3.2'
|
||||||
|
|
||||||
depends 'nginx'
|
depends 'nginx'
|
||||||
depends 'firewall'
|
depends 'firewall'
|
||||||
|
@ -47,6 +47,6 @@ action :create do
|
|||||||
::File.exist?("#{node['nginx']['dir']}/sites-enabled/#{domain}_certbot") &&
|
::File.exist?("#{node['nginx']['dir']}/sites-enabled/#{domain}_certbot") &&
|
||||||
!::File.exist?("/etc/letsencrypt/live/#{domain}/fullchain.pem")
|
!::File.exist?("/etc/letsencrypt/live/#{domain}/fullchain.pem")
|
||||||
end
|
end
|
||||||
notifies :create, "template[#{node['nginx']['dir']}/sites-available/#{site}]", :delayed
|
notifies :create, "template[#{node['nginx']['dir']}/sites-available/#{site}]", :immediately
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user