Skip to content

Commit

Permalink
Merge pull request #287 from opus-codium/ensure-safe-registration
Browse files Browse the repository at this point in the history
Fix registration after an unsafe one
  • Loading branch information
ekohl authored May 3, 2022
2 parents c15411e + 42cb163 commit a03cf71
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@
$_config = $config
}

ini_setting { "${config_file} register-unsafely-without-email true":
ensure => bool2str($unsafe_registration, 'present', 'absent'),
path => $config_file,
section => '',
setting => 'register-unsafely-without-email',
value => true,
}

unless 'email' in $_config {
if $unsafe_registration {
warning('No email address specified for the letsencrypt class! Registering unsafely!')
ini_setting { "${config_file} register-unsafely-without-email true":
ensure => present,
path => $config_file,
section => '',
setting => 'register-unsafely-without-email',
value => true,
require => File[$config_dir],
}
} else {
fail("Please specify an email address to register with Let's Encrypt using the \$email parameter on the letsencrypt class")
}
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
},
{
"name": "puppetlabs/inifile",
"version_requirement": ">= 2.0.0 < 6.0.0"
"version_requirement": ">= 2.5.0 < 6.0.0"
},
{
"name": "puppet/epel",
Expand Down

0 comments on commit a03cf71

Please sign in to comment.