diff --git a/manifests/certonly.pp b/manifests/certonly.pp index a7de19f4..47e33522 100644 --- a/manifests/certonly.pp +++ b/manifests/certonly.pp @@ -52,9 +52,9 @@ } if ($custom_plugin) { - $command_start = "${letsencrypt_command} --text --agree-tos --non-interactive certonly " + $command_start = "${letsencrypt_command} --text --agree-tos --non-interactive --expand certonly " } else { - $command_start = "${letsencrypt_command} --text --agree-tos --non-interactive certonly -a ${plugin} " + $command_start = "${letsencrypt_command} --text --agree-tos --non-interactive --expand certonly -a ${plugin} " } if $plugin == 'webroot' { @@ -82,11 +82,12 @@ $live_path = "${config_dir}/live/${domains[0]}/cert.pem" $execution_environment = [ "VENV_PATH=${letsencrypt::venv_path}", ] + $environment + $verify_domains = join($domains, ' -d ') exec { "letsencrypt certonly ${title}": command => $command, path => $::path, environment => $execution_environment, - creates => $live_path, + unless => [ "test -f ${live_path}", "${letsencrypt_command} certificates -d ${verify_domains}"], require => Class['letsencrypt'], }