Puppet Class: slurm::slurmrestd::service
- Defined in:
- manifests/slurmrestd/service.pp
Overview
[View source]
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 |
# File 'manifests/slurmrestd/service.pp', line 2
class slurm::slurmrestd::service {
file { "${slurm::env_dir}/slurmrestd":
ensure => 'file',
owner => 'root',
group => 'root',
mode => '0644',
content => template('slurm/sysconfig/slurmrestd.erb'),
notify => Service['slurmrestd'],
}
if ! empty($slurm::slurmrestd_service_limits) {
systemd::service_limits { 'slurmrestd.service':
limits => $slurm::slurmrestd_service_limits,
restart_service => false,
notify => Service['slurmrestd'],
}
}
systemd::dropin_file { 'slurmrestd-logging.conf':
ensure => $slurm::logging_systemd_override,
unit => 'slurmrestd.service',
content => join([
'# File managed by Puppet',
'[Service]',
'StandardOutput=null',
'StandardError=null',
], "\n"),
notify_service => false,
notify => Service['slurmrestd'],
}
systemd::unit_file { 'slurmrestd.service':
ensure => 'present',
content => template('slurm/slurmrestd/slurmrestd.service.erb'),
notify => Service['slurmrestd'],
}
service { 'slurmrestd':
ensure => $slurm::slurmrestd_service_ensure,
enable => $slurm::slurmrestd_service_enable,
hasstatus => true,
hasrestart => true,
}
}
|