Skip to content

Commit dea27d5

Browse files
committed
Update OS support
Adds Debian 9 (Stretch), Debian 10 (Buster) and Fedora 30. Drops Debian 8 (Jessie) and Ubuntu 14.04. Debian 8 is in LTS, but Debian backports doesn't support LTS repositories. When Buster came out, the Jessie backports repository was dropped. It can still install using VCS, but that's not supported by this module and up to the user. Ubuntu 14.04 is EOL.
1 parent e7b53d7 commit dea27d5

File tree

8 files changed

+61
-76
lines changed

8 files changed

+61
-76
lines changed

.sync.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
.travis.yml:
33
docker_sets:
44
- set: centos7-64
5-
- set: ubuntu1404-64
5+
- set: debian9-64
6+
- set: fedora29-64
7+
- set: fedora30-64
68
- set: ubuntu1604-64
79
- set: ubuntu1804-64
810
secure: "n/CVUS2upgv5DifCm/YsjBxR/11bdTRDYi1x9QK6ILa32+6ngVV2RQaIMXXJfJKYIPT8/O21tpc9C7fOBRGhRpNbl0usfvqsZS0C9UkpEx6AqT7lcRzj6pLrNn3IuChhZ0tQjNiKp9LxVTzltxr5uTFwKKCE4o534v/DLAzkzq5EAZuBWpRS1rcVHQA3o0767Gu3601yyYkZj9ySDH5RpbSdTCcNkTzwtFhr2NEvVb+2FI0RhchDSqPBfNWHV4Hn3dKuL42MNC2zjd2FYFpC8F27OXk/erUZIOZFfpZuIWypjSimfVC95a2Nb8kfQotTvQxUI1fwiB01ibUQGGkJj+mh7Utg/byBrbijpJnWRR7TT6oQ1NbIUHVXcqE1tfpbCBZ4Ws2Hqji0QoGc0fMrkt1NVlZlgbVrb9t+ctb1QcLaEPI+1Zf2a3AZhXOKA1EGx2W5DTQSWSPv57BUtFPICZENQi/ats30h+0FwtN7rjfx8Q6BIGO2D5JODI6eJC0nLNaL5UaPA0pjGRsNlZWoUzieuKG08G/rQtj/8jLq/3eLICv1cbfvj7lDPc0thPwXdrPIC9nLSisb/wdLufpqXsFku9TeBqrRHfQWImybcv7JRAeZZeHEo+tvFvZg5MSAEiPmz8zIOJOKhuMKEXlOmALmSjEhW6Ca5r7xuQ5Qwm0="

.travis.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,27 @@ matrix:
3333
services: docker
3434
- rvm: 2.5.3
3535
bundler_args: --without development release
36-
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=ubuntu1404-64 BEAKER_HYPERVISOR=docker CHECK=beaker
36+
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=debian9-64 BEAKER_HYPERVISOR=docker CHECK=beaker
3737
services: docker
3838
- rvm: 2.5.3
3939
bundler_args: --without development release
40-
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=ubuntu1404-64 BEAKER_HYPERVISOR=docker CHECK=beaker
40+
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=debian9-64 BEAKER_HYPERVISOR=docker CHECK=beaker
41+
services: docker
42+
- rvm: 2.5.3
43+
bundler_args: --without development release
44+
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=fedora29-64 BEAKER_HYPERVISOR=docker CHECK=beaker
45+
services: docker
46+
- rvm: 2.5.3
47+
bundler_args: --without development release
48+
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=fedora29-64 BEAKER_HYPERVISOR=docker CHECK=beaker
49+
services: docker
50+
- rvm: 2.5.3
51+
bundler_args: --without development release
52+
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=fedora30-64 BEAKER_HYPERVISOR=docker CHECK=beaker
53+
services: docker
54+
- rvm: 2.5.3
55+
bundler_args: --without development release
56+
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=fedora30-64 BEAKER_HYPERVISOR=docker CHECK=beaker
4157
services: docker
4258
- rvm: 2.5.3
4359
bundler_args: --without development release

README.md

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,6 @@ The module can integrate with [stahnma/epel](https://forge.puppetlabs.com/stahnm
2424
to set up the repo by setting the `configure_epel` parameter to `true` (the default for RedHat) and
2525
installing the module.
2626

27-
On Debian Jessie the module assumes the package certbot is available. This
28-
package can be found in jessie-backports. When using
29-
[puppetlabs/apt](https://forge.puppet.com/puppetlabs/apt) the following code
30-
can be used:
31-
32-
```puppet
33-
include apt
34-
include apt::backports
35-
apt::pin { 'jessie-backports-letsencrypt':
36-
release => 'jessie-backports',
37-
packages => prefix(['acme', 'cryptography', 'openssl', 'psutil', 'setuptools', 'pyasn1', 'pkg-resources'], 'python-'),
38-
priority => 700,
39-
}
40-
```
41-
4227
## Usage
4328

4429
### Setting up the Let's Encrypt client

manifests/params.pp

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# @summary Default parameters
2+
# @api private
13
class letsencrypt::params {
24
$agree_tos = true
35
$unsafe_registration = false
@@ -14,22 +16,12 @@
1416
'server' => 'https://acme-v01.api.letsencrypt.org/directory',
1517
}
1618

17-
if $facts['operatingsystem'] == 'Debian' and versioncmp($facts['operatingsystemrelease'], '8') >= 0 {
19+
if $facts['osfamily'] == 'Debian' {
1820
$install_method = 'package'
1921
$package_name = 'certbot'
2022
$package_command = 'certbot'
2123
$config_dir = '/etc/letsencrypt'
22-
} elsif $facts['operatingsystem'] == 'Ubuntu' and versioncmp($facts['operatingsystemrelease'], '16.04') == 0 {
23-
$install_method = 'package'
24-
$package_name = 'letsencrypt'
25-
$package_command = 'letsencrypt'
26-
$config_dir = '/etc/letsencrypt'
27-
} elsif $facts['operatingsystem'] == 'Ubuntu' and versioncmp($facts['operatingsystemrelease'], '18.04') >= 0 {
28-
$install_method = 'package'
29-
$package_name = 'certbot'
30-
$package_command = 'certbot'
31-
$config_dir = '/etc/letsencrypt'
32-
} elsif $facts['osfamily'] == 'RedHat' and versioncmp($facts['operatingsystemmajrelease'], '7') >= 0 {
24+
} elsif $facts['osfamily'] == 'RedHat' {
3325
$install_method = 'package'
3426
$package_name = 'certbot'
3527
$package_command = 'certbot'
@@ -58,11 +50,7 @@
5850

5951
$config_file = "${config_dir}/cli.ini"
6052

61-
if $facts['osfamily'] == 'RedHat' {
62-
$configure_epel = $facts['os']['name'] != 'Fedora'
63-
} else {
64-
$configure_epel = false
65-
}
53+
$configure_epel = $facts['osfamily'] == 'RedHat' and $facts['os']['name'] != 'Fedora'
6654

6755
$cron_owner_group = $facts['osfamily'] ? {
6856
'OpenBSD' => 'wheel',

metadata.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,22 @@
2929
{
3030
"operatingsystem": "Fedora",
3131
"operatingsystemrelease": [
32-
"29"
32+
"29",
33+
"30"
3334
]
3435
},
3536
{
3637
"operatingsystem": "Ubuntu",
3738
"operatingsystemrelease": [
38-
"14.04",
3939
"16.04",
4040
"18.04"
4141
]
4242
},
4343
{
4444
"operatingsystem": "Debian",
4545
"operatingsystemrelease": [
46-
"8"
46+
"9",
47+
"10"
4748
]
4849
},
4950
{

spec/classes/letsencrypt_spec.rb

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -64,23 +64,17 @@
6464
end
6565

6666
if facts[:osfamily] == 'RedHat'
67-
if facts[:operatingsystem] == 'Fedora'
68-
is_expected.not_to contain_class('epel')
69-
else
67+
if epel
7068
is_expected.to contain_class('epel').that_comes_before('Package[letsencrypt]')
69+
else
70+
is_expected.not_to contain_class('epel')
7171
end
72-
is_expected.to contain_class('letsencrypt::install').with(install_method: 'package')
72+
is_expected.to contain_class('letsencrypt::install').with(install_method: 'package').with(package_name: 'certbot')
7373
is_expected.to contain_class('letsencrypt').with(package_command: 'certbot')
7474
is_expected.to contain_package('letsencrypt').with(name: 'certbot')
7575
is_expected.to contain_file('/etc/letsencrypt').with(ensure: 'directory')
76-
elsif facts[:operatingsystem] == 'Debian'
77-
is_expected.to contain_class('letsencrypt::install').with(install_method: 'package')
78-
is_expected.to contain_file('/etc/letsencrypt').with(ensure: 'directory')
79-
elsif facts[:operatingsystem] == 'Ubuntu' && facts[:operatingsystemmajrelease] == '14.04'
80-
is_expected.to contain_class('letsencrypt::install').with(install_method: 'vcs')
81-
is_expected.to contain_file('/etc/letsencrypt').with(ensure: 'directory')
82-
elsif facts[:operatingsystem] == 'Ubuntu'
83-
is_expected.to contain_class('letsencrypt::install').with(install_method: 'package')
76+
elsif facts[:osfamily] == 'Debian'
77+
is_expected.to contain_class('letsencrypt::install').with(install_method: 'package').with(package_name: 'certbot')
8478
is_expected.to contain_file('/etc/letsencrypt').with(ensure: 'directory')
8579
elsif facts[:operatingsystem] == 'Gentoo'
8680
is_expected.to contain_class('letsencrypt::install').with(install_method: 'package').with(package_name: 'app-crypt/certbot')

0 commit comments

Comments
 (0)