Skip to content
This repository was archived by the owner on Mar 28, 2019. It is now read-only.

Commit 039f43f

Browse files
author
Maxime VISONNEAU
committed
Added the possibility to create a proxy through the CA
1 parent 31f2111 commit 039f43f

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

manifests/server.pp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@
159159
$storeconfigs = undef,
160160
$package = $puppet::params::master_package,
161161
$tagmail = {}
162+
$external_ca = undef,
162163
) inherits puppet::params {
163164

164165
validate_bool($ca)

manifests/server/unicorn.pp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,25 @@
5959
],
6060
}
6161

62+
if ! empty( $::puppet::server::external_ca )
63+
{
64+
nginx::resource::location { 'external_certificate_authority_proxy':
65+
ensure => present,
66+
location => '~ ^/.*/certificate.*',
67+
vhost => 'puppetmaster',
68+
proxy_set_header => [],
69+
location_custom_cfg => {
70+
proxy_pass => $::puppet::server::external_ca,
71+
proxy_redirect => 'off',
72+
proxy_connect_timeout => '90',
73+
proxy_read_timeout => '300',
74+
},
75+
# this priority sets concat order so that the location is created inside
76+
# the server block. This works around a possible bug in jfryman/nginx.
77+
priority => 700,
78+
}
79+
}
80+
6281
unicorn::app { 'puppetmaster':
6382
approot => $::puppet::params::puppet_confdir,
6483
config_file => "${::puppet::params::puppet_confdir}/unicorn.conf",

0 commit comments

Comments
 (0)