From d7ed7c2565942a7767420d15d82752ccf2a9b872 Mon Sep 17 00:00:00 2001 From: mh Date: Sat, 14 Nov 2009 16:02:48 +0100 Subject: [PATCH] update to 0.25.x style --- manifests/base.pp | 11 +++++++++++ manifests/init.pp | 24 ------------------------ manifests/linux.pp | 11 +++++++++++ 3 files changed, 22 insertions(+), 24 deletions(-) create mode 100644 manifests/base.pp create mode 100644 manifests/linux.pp diff --git a/manifests/base.pp b/manifests/base.pp new file mode 100644 index 0000000..ed1a630 --- /dev/null +++ b/manifests/base.pp @@ -0,0 +1,11 @@ +class sudo::base { + if $sudo_deploy_sudoers { + file{'/etc/sudoers': + source => [ "puppet://$server/modules/site-sudo/sudoers/${fqdn}/sudoers", + "puppet://$server/modules/site-sudo/sudoers/sudoers", + "puppet://$server/modules/sudo/sudoers/${operatingsystem}/sudoers", + "puppet://$server/modules/sudo/sudoers/sudoers" ], + owner => root, group => 0, mode => 0440; + } + } +} diff --git a/manifests/init.pp b/manifests/init.pp index 813ecdb..87831de 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -8,27 +8,3 @@ class sudo { default: { include sudo::base } } } - -class sudo::base { - if $sudo_deploy_sudoers { - file{'/etc/sudoers': - source => [ "puppet://$server/files/sudo/sudoers/${fqdn}/sudoers", - "puppet://$server/files/sudo/sudoers/sudoers", - "puppet://$server/modules/sudo/sudoers/${operatingsystem}/sudoers", - "puppet://$server/modules/sudo/sudoers/sudoers" ], - owner => root, group => 0, mode => 0440; - } - } -} - -class sudo::linux inherits sudo::base { - package{'sudo': - ensure => installed, - } - - if $sudo_deploy_sudoers { - File['/etc/sudoers']{ - require => Package['sudo'], - } - } -} diff --git a/manifests/linux.pp b/manifests/linux.pp new file mode 100644 index 0000000..65517a8 --- /dev/null +++ b/manifests/linux.pp @@ -0,0 +1,11 @@ +class sudo::linux inherits sudo::base { + package{'sudo': + ensure => installed, + } + + if $sudo_deploy_sudoers { + File['/etc/sudoers']{ + require => Package['sudo'], + } + } +}