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 19:25:51 +02:00
|
|
|
$deploy_sudoers = $sudo::deploy_sudoers,
|
2013-06-22 19:31:31 +02:00
|
|
|
$path = $sudo::params::path,
|
2013-06-22 19:25:51 +02:00
|
|
|
$dir = $sudo::params::dir
|
|
|
|
) inherits sudo::params {
|
2013-06-22 19:38:12 +02:00
|
|
|
package {'sudo':
|
|
|
|
ensure => installed,
|
2013-06-22 19:36:33 +02:00
|
|
|
}
|
|
|
|
if $sudo::deploy_sudoers {
|
|
|
|
file {
|
|
|
|
$sudo::path:
|
|
|
|
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'],
|
|
|
|
owner => root, group => 0, mode => 0440;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
file {
|
|
|
|
$sudo::dir:
|
|
|
|
ensure => directory,
|
|
|
|
require => Package['sudo'],
|
|
|
|
owner => root, group => 0, mode => 0550;
|
2012-06-08 18:18:33 +02:00
|
|
|
}
|
2009-01-25 23:36:24 +01:00
|
|
|
}
|