Skip to content

Commit e196679

Browse files
committed
allow setting CHALLENGE_CHECK_TYPE per domain
1 parent b12ac72 commit e196679

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

manifests/domain.pp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
# [*use_single_acl*]
2727
# Bool if true: only one acl directory must be specified.
2828
# If false: for each subdomain on acl. Default true.
29+
# [*domain_challenge_check_type*]
30+
# Protocol to use for the challenge (http or https). Defaults to http.
2931
# [*sub_domains*]
3032
# Array with all subdomains for specified certificate. Defaults to empty Array.
3133
# [*domain_private_key_alg*]
@@ -74,6 +76,7 @@
7476
$domain = $name,
7577
$acl = $getssl::params::acl,
7678
$use_single_acl = $getssl::params::use_single_acl,
79+
$domain_challenge_check_type = $getssl::params::domain_challenge_check_type,
7780
$sub_domains = $getssl::params::sub_domains,
7881
$domain_private_key_alg = $getssl::params::domain_private_key_alg,
7982
$domain_account_key_length = $getssl::params::domain_account_key_length,
@@ -97,6 +100,10 @@
97100
validate_integer($domain_renew_allow)
98101
validate_bool($domain_check_remote, $use_single_acl)
99102

103+
if $domain_challenge_check_type {
104+
validate_string($domain_challenge_check_type)
105+
}
106+
100107
if $ca_cert_location {
101108
validate_string($ca_cert_location)
102109
}
@@ -192,7 +199,8 @@
192199
'domain_renew_allow' => $domain_renew_allow,
193200
'domain_server_type' => $domain_server_type,
194201
'sub_domains' => $sub_domains,
195-
'use_single_acl' => $use_single_acl
202+
'use_single_acl' => $use_single_acl,
203+
'domain_challenge_check_type' => $domain_challenge_check_type
196204
}),
197205
notify => $config_notifiers,
198206
}

manifests/params.pp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
$domain = undef
2828
$acl = []
2929
$use_single_acl = true
30+
$domain_challenge_check_type = undef
3031
$sub_domains = []
3132
$domain_private_key_alg = 'rsa'
3233
$domain_account_key_length = 4096

templates/domain_getssl.cfg.epp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ ACL=(<% $acl.each |$value| { %>'<%= $value %>'<% } %>)
2626
#Enable use of a single ACL for all checks
2727
USE_SINGLE_ACL=<%= $use_single_acl -%>
2828

29+
<% if $domain_challenge_check_type { -%>
30+
CHALLENGE_CHECK_TYPE="<%= $domain_challenge_check_type -%>"
31+
<% } -%>
32+
2933
# Location for all your certs, these can either be on the server (full path name)
3034
# or using ssh /sftp as for the ACL
3135
<% if $domain_cert_location { -%>

0 commit comments

Comments
 (0)