From 92073a73709ec8f7ede198e0c8db5df70597f29b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= Date: Sat, 22 Jun 2013 13:31:31 -0400 Subject: [PATCH] make the path sudoers a parameter too this simplifies the freebsd code greatly --- manifests/base.pp | 2 +- manifests/freebsd.pp | 7 ------- manifests/init.pp | 1 + 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/manifests/base.pp b/manifests/base.pp index b70e439..dfe3f94 100644 --- a/manifests/base.pp +++ b/manifests/base.pp @@ -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", diff --git a/manifests/freebsd.pp b/manifests/freebsd.pp index c115874..a419da1 100644 --- a/manifests/freebsd.pp +++ b/manifests/freebsd.pp @@ -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'], - } - } } diff --git a/manifests/init.pp b/manifests/init.pp index 4e6a50f..09f9493 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -4,6 +4,7 @@ class sudo( $deploy_sudoers = $sudo::deploy_sudoers, + $path = $sudo::params::path, $dir = $sudo::params::dir ) inherits sudo::params { case $::kernel {