puppet/oidentd/manifests/init.pp
2016-04-18 15:32:47 +03:00

47 lines
1.1 KiB
Puppet

# Install oidentd service
#
# === Parameters:
#
# $config:
# Source to oidentd.conf. Default is to install empty config.
#
class oidentd($config=undef) {
package { "oidentd":
ensure => installed,
}
file { "/etc/oidentd.conf":
ensure => present,
source => $config,
content => $config ? {
undef => "",
default => undef,
},
mode => "0644",
owner => "root",
group => $::operatingsystem ? {
"openbsd" => "wheel",
default => "root",
},
require => Package["oidentd"],
notify => Service["oidentd"],
}
if $::operatingsystem == "OpenBSD" {
file { "/etc/rc.d/oidentd":
ensure => present,
mode => "0555",
owner => "root",
group => "bin",
source => "puppet:///modules/oidentd/oidentd.rc",
before => Service["oidentd"],
}
}
service { "oidentd":
ensure => running,
enable => true,
}
}