From 904dccd73d42fbb2f9a61e5c783b312dbb591455 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Sun, 2 May 2021 16:55:41 +0200 Subject: [PATCH] Migrate from certbot-auto to certbot --- README.md | 2 +- REFERENCE.md | 2 +- manifests/certonly.pp | 2 +- manifests/init.pp | 2 +- spec/classes/letsencrypt_spec.rb | 4 ++-- spec/defines/letsencrypt_certonly_spec.rb | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 8b4f9f92..5074e28a 100644 --- a/README.md +++ b/README.md @@ -169,7 +169,7 @@ letsencrypt::certonly { 'foo': #### Additional arguments -If you need to pass a command line flag to the `letsencrypt-auto` command that +If you need to pass a command line flag to the `letsencrypt` command that is not supported natively by this module, you can use the `additional_args` parameter to pass those arguments: diff --git a/REFERENCE.md b/REFERENCE.md index 9931d21a..cf1a8f72 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -726,7 +726,7 @@ Default value: `$letsencrypt::command` Data type: `Array[String[1]]` -An array of additional command line arguments to pass to the `letsencrypt-auto` command. +An array of additional command line arguments to pass to the `letsencrypt` command. Default value: `[]` diff --git a/manifests/certonly.pp b/manifests/certonly.pp index b639fc95..22100b6b 100644 --- a/manifests/certonly.pp +++ b/manifests/certonly.pp @@ -16,7 +16,7 @@ # `webroot_paths` are not the same length, the last `webroot_paths` # element will be used for all subsequent domains. # @param letsencrypt_command Command to run letsencrypt -# @param additional_args An array of additional command line arguments to pass to the `letsencrypt-auto` command. +# @param additional_args An array of additional command line arguments to pass to the `letsencrypt` command. # @param environment An optional array of environment variables (in addition to VENV_PATH). # @param key_size Size for the RSA public key # @param manage_cron diff --git a/manifests/init.pp b/manifests/init.pp index 3a1aee37..10444eaf 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -102,7 +102,7 @@ $command_init = $install_method ? { 'package' => $package_command, - 'vcs' => "${path}/letsencrypt-auto", + 'vcs' => "${path}/letsencrypt", } if $manage_config { diff --git a/spec/classes/letsencrypt_spec.rb b/spec/classes/letsencrypt_spec.rb index 625fa58b..a8370025 100644 --- a/spec/classes/letsencrypt_spec.rb +++ b/spec/classes/letsencrypt_spec.rb @@ -102,7 +102,7 @@ let(:additional_params) { { path: '/usr/lib/letsencrypt', install_method: 'vcs' } } it { is_expected.to contain_class('letsencrypt::install').with_path('/usr/lib/letsencrypt') } - it { is_expected.to contain_exec('initialize letsencrypt').with_command('/usr/lib/letsencrypt/letsencrypt-auto -h') } + it { is_expected.to contain_exec('initialize letsencrypt').with_command('/usr/lib/letsencrypt/letsencrypt -h') } end describe 'with custom environment variables' do @@ -169,7 +169,7 @@ let(:additional_params) { { install_method: 'vcs' } } it { is_expected.to contain_class('letsencrypt::install').with_install_method('vcs') } - it { is_expected.to contain_exec('initialize letsencrypt').with_command('/opt/letsencrypt/letsencrypt-auto -h') } + it { is_expected.to contain_exec('initialize letsencrypt').with_command('/opt/letsencrypt/letsencrypt -h') } end describe 'with custom config directory' do diff --git a/spec/defines/letsencrypt_certonly_spec.rb b/spec/defines/letsencrypt_certonly_spec.rb index 63028b71..2086e631 100644 --- a/spec/defines/letsencrypt_certonly_spec.rb +++ b/spec/defines/letsencrypt_certonly_spec.rb @@ -61,10 +61,10 @@ context 'with custom command' do let(:title) { 'foo.example.com' } - let(:params) { { letsencrypt_command: '/usr/lib/letsencrypt/letsencrypt-auto' } } + let(:params) { { letsencrypt_command: '/usr/lib/letsencrypt/letsencrypt' } } it { is_expected.to compile.with_all_deps } - it { is_expected.to contain_exec('letsencrypt certonly foo.example.com').with_command '/usr/lib/letsencrypt/letsencrypt-auto --text --agree-tos --non-interactive certonly --rsa-key-size 4096 -a standalone --cert-name \'foo.example.com\' -d \'foo.example.com\'' } + it { is_expected.to contain_exec('letsencrypt certonly foo.example.com').with_command '/usr/lib/letsencrypt/letsencrypt --text --agree-tos --non-interactive certonly --rsa-key-size 4096 -a standalone --cert-name \'foo.example.com\' -d \'foo.example.com\'' } end context 'with webroot plugin' do