exim blacklist: add more recent spammers
[mirror/dsa-puppet.git] / modules / stunnel4 / manifests / client.pp
1 define stunnel4::client($accept, $connecthost, $connectport) {
2
3         include stunnel4
4
5         file { "/etc/stunnel/puppet-${name}-peer.pem":
6                 content => inline_template( @("EOF"),
7                                                 <%= File.read(scope().call_function("hiera", ["paths.auto_certs_dir"]) + "/" + @connecthost + ".crt") %>
8                                                 <%= File.read(scope().call_function("hiera", ["paths.auto_certs_dir"]) + "/ca.crt") %>
9                                                 | EOF
10                                         ),
11                 notify  => Exec["restart_stunnel_${name}"],
12         }
13
14         stunnel4::generic { $name:
15                 client  => true,
16                 verify  => 3,
17                 cafile  => "/etc/stunnel/puppet-${name}-peer.pem",
18                 accept  => $accept,
19                 connect => "${connecthost}:${connectport}",
20         }
21 }
22