From 110c37f7d1c315c67b267fa52839fbf8be4e4520 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 30 Jun 2011 20:43:26 -0300 Subject: Fixing debian config --- manifests/client/debian.pp | 2 +- manifests/debian.pp | 21 +++++++++++++++++++++ manifests/egd/debian.pp | 2 +- manifests/host/debian.pp | 21 --------------------- manifests/init.pp | 6 ++++-- 5 files changed, 27 insertions(+), 25 deletions(-) create mode 100644 manifests/debian.pp delete mode 100644 manifests/host/debian.pp diff --git a/manifests/client/debian.pp b/manifests/client/debian.pp index 658e208..d709bd9 100644 --- a/manifests/client/debian.pp +++ b/manifests/client/debian.pp @@ -1,3 +1,3 @@ -class ekeyd::cliend::debian { +class ekeyd::cliend::debian inherits ekeyd::cliend::base { include ekeyd::egd::debian } diff --git a/manifests/debian.pp b/manifests/debian.pp new file mode 100644 index 0000000..8a2e911 --- /dev/null +++ b/manifests/debian.pp @@ -0,0 +1,21 @@ +class ekeyd::debian inherits ekeyd::base { + package { "usbutils": ensure => installed } + + if ( $virtual == "vserver" ) or ( $virtual == "xenu" ) { + fail("This class shouldn't be included on vservers or xen domUs") + } + + file { "/etc/default/ekeyd": + source => "puppet:///modules/ekeyd/debian/ekeyd.default", + mode => 644, + owner => root, + group => root, + require => File["/etc/entropykey/ekeyd.conf"]; + } + + Service["ekeyd"] { + subscribe => [ File["/etc/default/ekeyd"], File["/etc/entropykey/ekeyd.conf"] ]; + pattern => '/usr/sbin/ekeyd', + hasrestart => true, + } +} diff --git a/manifests/egd/debian.pp b/manifests/egd/debian.pp index 1c2c37d..f682216 100644 --- a/manifests/egd/debian.pp +++ b/manifests/egd/debian.pp @@ -1,4 +1,4 @@ -class egd::debian inherits ekeyd::egd { +class ekeyd::egd::debian inherits ekeyd::egd { if ( $virtual == "vserver" ) { fail("This class shouldn't be included on vservers") } diff --git a/manifests/host/debian.pp b/manifests/host/debian.pp deleted file mode 100644 index 773d84d..0000000 --- a/manifests/host/debian.pp +++ /dev/null @@ -1,21 +0,0 @@ -class ekeyd::host::debian inherits ekeyd::host::base { - package { "usbutils": ensure => installed } - - if ( $virtual == "vserver" ) or ( $virtual == "xenu" ) { - fail("This class shouldn't be included on vservers or xen domUs") - } - - file { "/etc/default/ekeyd": - source => "puppet:///modules/ekeyd/debian/ekeyd.default", - mode => 644, - owner => root, - group => root, - require => File["/etc/entropykey/ekeyd.conf"]; - } - - Service["ekeyd"] { - subscribe => [ File["/etc/default/ekeyd"], File["/etc/entropykey/ekeyd.conf"] ]; - pattern => '/usr/sbin/ekeyd', - hasrestart => true, - } -} diff --git a/manifests/init.pp b/manifests/init.pp index b337d5b..3d0e507 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -5,12 +5,14 @@ class ekeyd( if $ekeyd_key_present != 'true' { fail("Can't find an ekey key plugged into usb on ${fqdn}") } - include ekeyd::base + case $operatingsystem { + debian: { include ekeyd::debian } + default: { include ekeyd::base } + } if $ekeyd_host { case $operatingsystem { centos: { include ekeyd::host::centos } - debian: { include ekeyd::host::debian } default: { include ekeyd::host::base } } -- cgit v1.2.3