Skip to content

Commit

Permalink
Merge pull request #337 from kenyon/move-configure_epel-to-init
Browse files Browse the repository at this point in the history
move `letsencrypt::configure_epel` from hiera to `init.pp`
  • Loading branch information
kenyon committed Nov 26, 2023
2 parents 7fae584 + 491a6ca commit bc927da
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 9 deletions.
2 changes: 2 additions & 0 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ Data type: `Boolean`

A feature flag to include the 'epel' class and depend on it for package installation.

Default value: `false`

##### <a name="-letsencrypt--agree_tos"></a>`agree_tos`

Data type: `Boolean`
Expand Down
2 changes: 0 additions & 2 deletions data/common.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
# Example: "example.com www.example.com"
#
class letsencrypt (
Boolean $configure_epel,
Boolean $configure_epel = false,
Optional[String] $email = undef,
Array $environment = [],
String $package_name = 'certbot',
Expand Down
11 changes: 9 additions & 2 deletions manifests/plugin/dns_cloudflare.pp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
Boolean $manage_package = true,
Integer $propagation_seconds = 10,
) {
require letsencrypt
include letsencrypt

if ! $api_key and ! $api_token {
fail('No authentication method provided, please specify either api_token or api_key and api_email.')
Expand All @@ -34,8 +34,15 @@
fail('No package name provided for certbot dns cloudflare plugin.')
}

$requirement = if $letsencrypt::configure_epel {
Class['epel']
} else {
undef
}

package { $package_name:
ensure => $letsencrypt::package_ensure,
ensure => $letsencrypt::package_ensure,
require => $requirement,
}
}

Expand Down
2 changes: 1 addition & 1 deletion manifests/plugin/dns_rfc2136.pp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
Stdlib::Absolutepath $config_dir = $letsencrypt::config_dir,
Boolean $manage_package = true,
) {
require letsencrypt
include letsencrypt

if $manage_package {
package { $package_name:
Expand Down
2 changes: 1 addition & 1 deletion manifests/plugin/dns_route53.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
Integer $propagation_seconds = 10,
Boolean $manage_package = true,
) {
require letsencrypt
include letsencrypt

if $manage_package {
package { $package_name:
Expand Down
2 changes: 1 addition & 1 deletion manifests/plugin/nginx.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Boolean $manage_package = true,
String[1] $package_name = 'python3-certbot-nginx',
) {
require letsencrypt
include letsencrypt

if $manage_package {
package { $package_name:
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
{
"operatingsystem": "Fedora",
"operatingsystemrelease": [
"36"
"39"
]
},
{
Expand Down

0 comments on commit bc927da

Please sign in to comment.