From b841d178ff55c28310cd466da6bd058c2e582c5c Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 16 Jun 2016 19:40:11 -0300 Subject: More certbot enhancements --- manifests/certbot.pp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'manifests/certbot.pp') diff --git a/manifests/certbot.pp b/manifests/certbot.pp index da2c67b..98f5203 100644 --- a/manifests/certbot.pp +++ b/manifests/certbot.pp @@ -13,9 +13,10 @@ define nginx::certbot( require => Package['certbot'], } + # Make sure nginx is restarted and request a certificate exec { "certbot-${name}": - command => "/usr/bin/certbot certonly --webroot -w /var/www/certbot/${name} -d ${name} -d www.${name} -m ${email} --rsa-key-size ${size} --agree-tos", + command => "/usr/sbin/service nginx restart && /usr/bin/certbot certonly --webroot -w /var/www/certbot/${name} -d ${name} -d www.${name} -m ${email} --rsa-key-size ${size} --agree-tos", creates => "/etc/letsencrypt/archive/${name}", - require => File["/var/www/certbot/${name}"], + require => File["/var/www/certbot/${name}", "/etc/nginx/sites-enabled/$name"], } } -- cgit v1.2.3