Puppet Function: tlsinfo::certpath
- Defined in:
-
lib/puppet/functions/tlsinfo/certpath.rb
- Function type:
- Ruby 4.x API
Overview
tlsinfo::certpath(String $cert, Optional[Stdlib::Unixpath] $basepath) ⇒ Any
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# File 'lib/puppet/functions/tlsinfo/certpath.rb', line 4
Puppet::Functions.create_function(:'tlsinfo::certpath') do
dispatch :certpath do
param 'String', :cert
optional_param 'Stdlib::Unixpath', :basepath
end
def certpath(cert, basepath = nil)
unless basepath
basepath = closure_scope['tlsinfo::params::certbase']
end
base = Puppet_X::TlsInfo.basename(cert)
"#{basepath}/#{base}.pem"
end
end
|