X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fstunnel4%2Fmanifests%2Fclient.pp;h=e34cb10e93b500a88f56f1d65bbf4606d83f136f;hb=a2afb600d7d2187b16da01c98a50f00f06aea6a6;hp=b13e3d49cf48b9aa4770aecf426338ccc294fbe9;hpb=dd6385d0133716bda9e049597e71c5f3d9acaa8d;p=mirror%2Fdsa-puppet.git diff --git a/modules/stunnel4/manifests/client.pp b/modules/stunnel4/manifests/client.pp index b13e3d49c..e34cb10e9 100644 --- a/modules/stunnel4/manifests/client.pp +++ b/modules/stunnel4/manifests/client.pp @@ -3,8 +3,11 @@ define stunnel4::client($accept, $connecthost, $connectport) { include stunnel4 file { "/etc/stunnel/puppet-${name}-peer.pem": - content => generate('/bin/cat', "/etc/puppet/modules/ssl/files/auto-certs/${connecthost}.crt", - '/etc/puppet/modules/ssl/files/auto-certs/ca.crt'), + content => inline_template( @("EOF"), + <%= File.read(scope().call_function("hiera", ["paths.auto_certs_dir"]) + "/" + @connecthost + ".crt") %> + <%= File.read(scope().call_function("hiera", ["paths.auto_certs_dir"]) + "/ca.crt") %> + | EOF + ), notify => Exec["restart_stunnel_${name}"], }