|
| 1 | +# @summary Default parameters |
| 2 | +# @api private |
1 | 3 | class letsencrypt::params { |
2 | 4 | $agree_tos = true |
3 | 5 | $unsafe_registration = false |
|
14 | 16 | 'server' => 'https://acme-v01.api.letsencrypt.org/directory', |
15 | 17 | } |
16 | 18 |
|
17 | | - if $facts['operatingsystem'] == 'Debian' and versioncmp($facts['operatingsystemrelease'], '8') >= 0 { |
| 19 | + if $facts['osfamily'] == 'Debian' { |
18 | 20 | $install_method = 'package' |
19 | 21 | $package_name = 'certbot' |
20 | 22 | $package_command = 'certbot' |
21 | 23 | $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' { |
33 | 25 | $install_method = 'package' |
34 | 26 | $package_name = 'certbot' |
35 | 27 | $package_command = 'certbot' |
|
58 | 50 |
|
59 | 51 | $config_file = "${config_dir}/cli.ini" |
60 | 52 |
|
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' |
66 | 54 |
|
67 | 55 | $cron_owner_group = $facts['osfamily'] ? { |
68 | 56 | 'OpenBSD' => 'wheel', |
|
0 commit comments