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
53
54
55
|
# File 'manifests/slurmd/service.pp', line 2
class slurm::slurmd::service {
file { "${slurm::env_dir}/slurmd":
ensure => 'file',
owner => 'root',
group => 'root',
mode => '0644',
content => template('slurm/sysconfig/slurmd.erb'),
notify => Service['slurmd'],
}
if ! empty($slurm::slurmd_service_limits) {
systemd::service_limits { 'slurmd.service':
limits => $slurm::slurmd_service_limits,
restart_service => false,
notify => Service['slurmd'],
}
}
systemd::dropin_file { 'slurmd-logging.conf':
ensure => $slurm::logging_systemd_override,
unit => 'slurmd.service',
content => join([
'# File managed by Puppet',
'[Service]',
'StandardOutput=null',
'StandardError=null',
], "\n"),
notify_service => false,
notify => Service['slurmd'],
}
if $slurm::install_method == 'source' {
systemd::unit_file { 'slurmd.service':
source => "file:///${slurm::src_dir}/etc/slurmd.service",
require => Exec['install-slurm'],
notify => Service['slurmd'],
}
}
service { 'slurmd':
ensure => $slurm::slurmd_service_ensure,
enable => $slurm::slurmd_service_enable,
hasstatus => true,
hasrestart => true,
}
exec { 'slurmd reload':
path => '/usr/bin:/bin:/usr/sbin:/sbin',
command => 'systemctl reload slurmd',
refreshonly => true,
require => Service['slurmd'],
}
}
|