Skip to content

Commit

Permalink
Use the correct package names on Debian
Browse files Browse the repository at this point in the history
This also allows using jessie-backports
  • Loading branch information
ekohl committed Apr 29, 2017
1 parent 014d4e4 commit 6957f3b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions README.md
Expand Up @@ -19,6 +19,9 @@ Debian and RedHat based operating systems, although it may work on others.
On EL (Red Hat, CentOS etc.) systems, the EPEL repository needs to be enabled
for the Let's Encrypt client package.

On Debian Jessie the module assumes the package certbot is available. This
package can be found in jessie-backports.

The module can integrate with [stahnma/epel](https://forge.puppetlabs.com/stahnma/epel)
to set up the repo by setting the `configure_epel` parameter to `true` (the default for RedHat) and
installing the module.
Expand Down
6 changes: 3 additions & 3 deletions manifests/params.pp
Expand Up @@ -14,10 +14,10 @@
'server' => 'https://acme-v01.api.letsencrypt.org/directory',
}

if $::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '9') >= 0 {
if $::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '8') >= 0 {
$install_method = 'package'
$package_name = 'letsencrypt'
$package_command = 'letsencrypt'
$package_name = 'certbot'
$package_command = 'certbot'
} elsif $::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '16.04') >= 0 {
$install_method = 'package'
$package_name = 'letsencrypt'
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/letsencrypt_spec.rb
Expand Up @@ -183,7 +183,7 @@
it { is_expected.to compile }

it 'contains the correct resources' do
is_expected.to contain_class('letsencrypt::install').with(install_method: 'vcs')
is_expected.to contain_class('letsencrypt::install').with(install_method: 'package')
end
end
end
Expand Down

0 comments on commit 6957f3b

Please sign in to comment.