Puppet Function: trafficserver::get_paths
- Defined in:
- modules/trafficserver/functions/get_paths.pp
- Function type:
- Puppet Language
Overview
SPDX-License-Identifier: Apache-2.0
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'modules/trafficserver/functions/get_paths.pp', line 2
function trafficserver::get_paths(Boolean $default_instance, String $instance_name) >> Hash {
$libdir = '/usr/lib/trafficserver'
$libexecdir = "${libdir}/modules"
$secretsdir = "/run/trafficserver-${instance_name}-secrets"
$stekfile = "${secretsdir}/tickets.key"
if $default_instance { # debian layout -- https://github.com/apache/trafficserver/blob/master/config.layout
$base_path = undef
$prefix = '/usr'
$exec_prefix = $prefix
$sysconfdir = '/etc/trafficserver'
$datadir = '/var/cache/trafficserver'
$localstatedir = '/run'
$runtimedir = '/run/trafficserver'
$logdir = '/var/log/trafficserver'
} else {
$base_path = '/srv/trafficserver'
$prefix = "${base_path}/${instance_name}"
$exec_prefix = $prefix
$sysconfdir = "${prefix}/etc"
$datadir = "${prefix}/var/cache"
$localstatedir = "${prefix}/var"
$runtimedir = "${prefix}/var/run"
$logdir = "${prefix}/var/log"
}
$bindir = "${exec_prefix}/bin"
$sbindir = "${exec_prefix}/sbin"
$includedir = "${prefix}/include"
$cachedir = $datadir
$paths = {
base_path => $base_path,
prefix => $prefix,
exec_prefix => $exec_prefix,
bindir => $bindir,
sbindir => $sbindir,
sysconfdir => $sysconfdir,
datadir => $datadir,
includedir => $includedir,
libdir => $libdir,
libexecdir => $libexecdir,
localstatedir => $localstatedir,
runtimedir => $runtimedir,
logdir => $logdir,
cachedir => $cachedir,
records => "${sysconfdir}/records.config",
ssl_multicert => "${sysconfdir}/ssl_multicert.config",
secretsdir => $secretsdir,
stekfile => $stekfile,
}
}
|