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
53
54
55
56
|
# File 'manifests/ns/config.pp', line 14
class anysync::ns::config (
Hash $cfg,
Hash $accounts,
String $user,
String $group,
String $daemon_name,
Boolean $syslog_ng = $::anysync::syslog_ng,
) {
$basedir = dirname($cfg['networkStorePath'])
user { $user:
ensure => present,
shell => '/sbin/nologin',
managehome => false,
}
-> group { $group:
ensure => present,
}
-> file {
"/etc/any-ns-node/":
ensure => directory,
;
"/etc/any-ns-node/config.yml":
content => template("${module_name}/yaml.erb"),
notify => Service["any-ns-node"],
;
[
$basedir,
$cfg['networkStorePath'],
]:
ensure => directory,
owner => $user,
group => $group,
;
}
if $syslog_ng {
syslog_ng::cfg { "any-ns-node": template => "t_short" }
}
systemd::unit_file { "any-ns-node.service":
content => template("${module_name}/service.erb"),
enable => true,
active => true,
}
}
|