make the path sudoers a parameter too

this simplifies the freebsd code greatly
This commit is contained in:
Antoine Beaupré 2013-06-22 13:31:31 -04:00
parent 6df937e3ed
commit 92073a7370
3 changed files with 2 additions and 8 deletions

View file

@ -1,7 +1,7 @@
class sudo::base {
if $sudo::deploy_sudoers {
file {
'/etc/sudoers':
$sudo::path:
source => [ "puppet:///modules/site_sudo/sudoers/${::fqdn}/sudoers",
"puppet:///modules/site_sudo/sudoers/sudoers",
"puppet:///modules/sudo/sudoers/${::operatingsystem}/sudoers",

View file

@ -2,11 +2,4 @@ class sudo::freebsd inherits sudo::base {
package{'sudo':
ensure => installed,
}
if $sudo_deploy_sudoers {
File['/etc/sudoers']{
path => "/usr/local/etc/sudoers",
require => Package['sudo'],
}
}
}

View file

@ -4,6 +4,7 @@
class sudo(
$deploy_sudoers = $sudo::deploy_sudoers,
$path = $sudo::params::path,
$dir = $sudo::params::dir
) inherits sudo::params {
case $::kernel {