Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit 357bd69

Browse files
Merge pull request #131 from xneelo/fix_bug_130
change to http when client cert is false
2 parents a5d3e09 + 82f4cf3 commit 357bd69

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

manifests/profile/puppetdb.pp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@
5353
}
5454
}
5555

56+
$protocol = $enable_client_cert ? {
57+
true => 'https',
58+
default => 'http'
59+
}
60+
5661
if puppet_metrics_dashboard::puppetdb_no_remote_metrics() {
5762
$metrics_version = 'v2/read'
5863
} else {
@@ -66,7 +71,7 @@
6671
'data_format' => 'json',
6772
'name_override' => "httpjson_puppetdb_${metric['name']}",
6873
'method' => 'GET',
69-
'urls' => [ "https://${puppetdb_host}:${port}/metrics/${metrics_version}/${metric['url']}" ],
74+
'urls' => [ "${protocol}://${puppetdb_host}:${port}/metrics/${metrics_version}/${metric['url']}" ],
7075
'timeout' => $timeout,
7176
'tags' => {
7277
'server' => $clientcert,
@@ -83,7 +88,7 @@
8388
options => [{
8489
'data_format' => 'json',
8590
'name_override' => 'httpjson_puppetdb_command_queue',
86-
'urls' => [ "https://${puppetdb_host}:${port}/status/v1/services?level=debug" ],
91+
'urls' => [ "${protocol}://${puppetdb_host}:${port}/status/v1/services?level=debug" ],
8792
'timeout' => $timeout,
8893
'tags' => {
8994
'server' => $clientcert,

0 commit comments

Comments
 (0)