module-sudo/manifests/init.pp

37 lines
920 B
ObjectPascal
Raw Normal View History

2009-01-25 23:36:24 +01:00
# manifests/init.pp - manage sudo stuff
# Copyright (C) 2007 admin@immerda.ch
# GPLv3
2012-06-08 18:18:33 +02:00
class sudo(
2013-06-22 20:24:47 +02:00
$deploy_sudoers = $sudo::params::deploy_sudoers,
$path = $sudo::params::path,
$dir = $sudo::params::dir
) inherits sudo::params {
2013-06-22 20:11:30 +02:00
2013-06-22 19:38:12 +02:00
package {'sudo':
ensure => installed,
}
2013-06-22 20:11:30 +02:00
if $sudo::deploy_sudoers {
file {
$sudo::path:
2013-06-22 20:11:30 +02:00
source => [ "puppet:///modules/site_sudo/sudoers/${::fqdn}/sudoers",
'puppet:///modules/site_sudo/sudoers/sudoers',
"puppet:///modules/sudo/sudoers/${::operatingsystem}/sudoers",
'puppet:///modules/sudo/sudoers/sudoers' ],
require => Package['sudo'],
2013-06-22 20:11:30 +02:00
owner => root,
group => 0,
mode => '0440';
}
}
file {
$sudo::dir:
2013-06-22 20:11:30 +02:00
ensure => directory,
require => Package['sudo'],
2013-06-22 20:11:30 +02:00
owner => root,
group => 0,
mode => '0550';
2012-06-08 18:18:33 +02:00
}
2009-01-25 23:36:24 +01:00
}