|
| 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 | + $dns_rfc2136_package_name = 'python3-certbot-dns-rfc2136' |
| 25 | + } elsif $facts['osfamily'] == 'RedHat' { |
33 | 26 | $install_method = 'package' |
34 | 27 | $package_name = 'certbot' |
35 | 28 | $package_command = 'certbot' |
36 | 29 | $config_dir = '/etc/letsencrypt' |
| 30 | + if $facts['operatingsystemmajrelease'] == '7' { |
| 31 | + $dns_rfc2136_package_name = 'python2-certbot-dns-rfc2136' |
| 32 | + } else { |
| 33 | + $dns_rfc2136_package_name = 'python3-certbot-dns-rfc2136' |
| 34 | + } |
37 | 35 | } elsif $facts['osfamily'] == 'Gentoo' { |
38 | 36 | $install_method = 'package' |
39 | 37 | $package_name = 'app-crypt/certbot' |
40 | 38 | $package_command = 'certbot' |
41 | 39 | $config_dir = '/etc/letsencrypt' |
| 40 | + $dns_rfc2136_package_name = undef |
42 | 41 | } elsif $facts['osfamily'] == 'OpenBSD' { |
43 | 42 | $install_method = 'package' |
44 | 43 | $package_name = 'certbot' |
45 | 44 | $package_command = 'certbot' |
46 | 45 | $config_dir = '/etc/letsencrypt' |
| 46 | + $dns_rfc2136_package_name = undef |
47 | 47 | } elsif $facts['osfamily'] == 'FreeBSD' { |
48 | 48 | $install_method = 'package' |
49 | 49 | $package_name = 'py27-certbot' |
50 | 50 | $package_command = 'certbot' |
51 | 51 | $config_dir = '/usr/local/etc/letsencrypt' |
| 52 | + $dns_rfc2136_package_name = undef |
52 | 53 | } else { |
53 | 54 | $install_method = 'vcs' |
54 | 55 | $package_name = 'letsencrypt' |
55 | 56 | $package_command = 'letsencrypt' |
56 | 57 | $config_dir = '/etc/letsencrypt' |
| 58 | + $dns_rfc2136_package_name = undef |
57 | 59 | } |
58 | 60 |
|
59 | 61 | $config_file = "${config_dir}/cli.ini" |
60 | 62 |
|
61 | | - if $facts['osfamily'] == 'RedHat' { |
62 | | - $configure_epel = $facts['os']['name'] != 'Fedora' |
63 | | - } else { |
64 | | - $configure_epel = false |
65 | | - } |
| 63 | + $configure_epel = $facts['osfamily'] == 'RedHat' and $facts['os']['name'] != 'Fedora' |
66 | 64 |
|
67 | 65 | $cron_owner_group = $facts['osfamily'] ? { |
68 | 66 | 'OpenBSD' => 'wheel', |
|
0 commit comments