1 define stunnel4::client($accept, $connecthost, $connectport) {
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") %>
11 notify => Exec["restart_stunnel_${name}"],
14 stunnel4::generic { $name:
17 cafile => "/etc/stunnel/puppet-${name}-peer.pem",
19 connect => "${connecthost}:${connectport}",