29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
# File 'manifests/init.pp', line 29
class loggly (
$base_dir = $loggly::params::base_dir,
$enable_tls = $loggly::params::enable_tls,
$cert_path = undef,
) inherits loggly::params {
$_cert_path = pick($cert_path, "${base_dir}/certs")
validate_absolute_path($base_dir)
validate_absolute_path($_cert_path)
validate_bool($enable_tls)
# create directory for loggly support files
file { $base_dir:
ensure => 'directory',
owner => 'root',
group => 'root',
mode => '0755',
}
# create directory for TLS certificates
file { $_cert_path:
ensure => 'directory',
owner => 'root',
group => 'root',
mode => '0755',
require => File[$base_dir],
}
# store the Loggly TLS cert inside $cert_path
file { "${_cert_path}/loggly_full.crt":
ensure => 'file',
owner => 'root',
group => 'root',
mode => '0644',
source => "puppet:///modules/${module_name}/loggly_full.crt",
require => File[$_cert_path],
}
}
|