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
68
69
70
71
72
|
# File 'manifests/bot.pp', line 30
define limnoria::bot (
Stdlib::FQDN $server_fqdn,
String $server_name,
String $nick,
Integer $port,
Boolean $ssl,
Array[String] $channels,
String $owner_info,
Optional[String] $sasl_password,
Optional[Hash] $custom_options,
) {
service {
"limnoria@${name}":
ensure => running,
hasrestart => true,
hasstatus => true,
enable => true,
require => File['/etc/systemd/system/limnoria@.service'];
}
file {
"/home/${limnoria::user}/${name}.conf":
ensure => file,
content => epp('limnoria/bot.conf.epp', {
'user' => $limnoria::user,
'server_fqdn' => $server_fqdn,
'server_name' => $server_name,
'nick' => $nick,
'port' => $port,
'ssl' => $ssl,
'channels' => $channels,
'log_dir' => $limnoria::log_dir,
'owner_info' => $owner_info,
'sasl_password' => $sasl_password,
'custom_options' => $custom_options,
}),
owner => $limnoria::user,
group => $limnoria::group,
mode => '0600',
notify => Service["limnoria@${name}"];
}
}
|