From cc082541980df1062cb5b2d10f4980cf8b6664c9 Mon Sep 17 00:00:00 2001 From: varac Date: Tue, 19 Mar 2013 13:54:40 +0100 Subject: moved generic stunnel config from site_webapp to site_stunnel --- puppet/modules/site_stunnel/manifests/clients.pp | 32 ++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 puppet/modules/site_stunnel/manifests/clients.pp (limited to 'puppet/modules/site_stunnel/manifests/clients.pp') diff --git a/puppet/modules/site_stunnel/manifests/clients.pp b/puppet/modules/site_stunnel/manifests/clients.pp new file mode 100644 index 00000000..28ed6d3c --- /dev/null +++ b/puppet/modules/site_stunnel/manifests/clients.pp @@ -0,0 +1,32 @@ +define site_stunnel::clients ( + $accept_port, + $connect, + $client = true, + $cafile, + $key, + $cert, + $verify = '2', + $pid = $name, + $rndfile = '/var/lib/stunnel4/.rnd', + $debuglevel = '4' ) { + + $couchdb_stunnel_client_defaults = { + 'cafile' => $ca_path, + 'key' => $key_path, + 'cert' => $cert_path, + } + + + stunnel::service { $name: + accept => "127.0.0.1:${accept_port}", + connect => "${connect}:6984", + client => $client, + cafile => $cafile, + key => $key, + cert => $cert, + verify => $verify, + pid => "/var/run/stunnel4/${pid}.pid", + rndfile => $rndfile, + debuglevel => $debuglevel + } + } -- cgit v1.2.3 From 4669a64cb8e63a67825a35513b51b4e1f2a4ec5d Mon Sep 17 00:00:00 2001 From: varac Date: Tue, 19 Mar 2013 15:14:35 +0100 Subject: moving generic stunnel config from site_webapp to site_stunnel now working --- puppet/modules/site_stunnel/manifests/clients.pp | 31 +++++++++--------------- 1 file changed, 12 insertions(+), 19 deletions(-) (limited to 'puppet/modules/site_stunnel/manifests/clients.pp') diff --git a/puppet/modules/site_stunnel/manifests/clients.pp b/puppet/modules/site_stunnel/manifests/clients.pp index 28ed6d3c..9f8aeaff 100644 --- a/puppet/modules/site_stunnel/manifests/clients.pp +++ b/puppet/modules/site_stunnel/manifests/clients.pp @@ -10,23 +10,16 @@ define site_stunnel::clients ( $rndfile = '/var/lib/stunnel4/.rnd', $debuglevel = '4' ) { - $couchdb_stunnel_client_defaults = { - 'cafile' => $ca_path, - 'key' => $key_path, - 'cert' => $cert_path, - } - - - stunnel::service { $name: - accept => "127.0.0.1:${accept_port}", - connect => "${connect}:6984", - client => $client, - cafile => $cafile, - key => $key, - cert => $cert, - verify => $verify, - pid => "/var/run/stunnel4/${pid}.pid", - rndfile => $rndfile, - debuglevel => $debuglevel - } + stunnel::service { $name: + accept => "127.0.0.1:${accept_port}", + connect => "${connect}:6984", + client => $client, + cafile => $cafile, + key => $key, + cert => $cert, + verify => $verify, + pid => "/var/run/stunnel4/${pid}.pid", + rndfile => $rndfile, + debuglevel => $debuglevel } +} -- cgit v1.2.3 From bb0f29e2d7ae2db57257eb4d1a20616c5c834a4e Mon Sep 17 00:00:00 2001 From: varac Date: Wed, 20 Mar 2013 19:06:07 +0100 Subject: make site_stunnel::clients connect_port configurable --- puppet/modules/site_stunnel/manifests/clients.pp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'puppet/modules/site_stunnel/manifests/clients.pp') diff --git a/puppet/modules/site_stunnel/manifests/clients.pp b/puppet/modules/site_stunnel/manifests/clients.pp index 9f8aeaff..b23c7bc6 100644 --- a/puppet/modules/site_stunnel/manifests/clients.pp +++ b/puppet/modules/site_stunnel/manifests/clients.pp @@ -1,5 +1,6 @@ define site_stunnel::clients ( $accept_port, + $connect_port, $connect, $client = true, $cafile, @@ -12,7 +13,7 @@ define site_stunnel::clients ( stunnel::service { $name: accept => "127.0.0.1:${accept_port}", - connect => "${connect}:6984", + connect => "${connect}:${connect_port}", client => $client, cafile => $cafile, key => $key, -- cgit v1.2.3 From ebc6b4f0e8f8c29b02b284d60402faaddbe2f6a3 Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Sun, 31 Mar 2013 12:10:33 -0400 Subject: lint so default options are together --- puppet/modules/site_stunnel/manifests/clients.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'puppet/modules/site_stunnel/manifests/clients.pp') diff --git a/puppet/modules/site_stunnel/manifests/clients.pp b/puppet/modules/site_stunnel/manifests/clients.pp index b23c7bc6..ed766e1a 100644 --- a/puppet/modules/site_stunnel/manifests/clients.pp +++ b/puppet/modules/site_stunnel/manifests/clients.pp @@ -2,10 +2,10 @@ define site_stunnel::clients ( $accept_port, $connect_port, $connect, - $client = true, $cafile, $key, $cert, + $client = true, $verify = '2', $pid = $name, $rndfile = '/var/lib/stunnel4/.rnd', -- cgit v1.2.3