summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2011-03-01 22:35:45 +0100
committermh <mh@immerda.ch>2011-03-01 22:35:45 +0100
commitbd9fa966f4bbd46693548a95d818adb3dc8ef3eb (patch)
tree151f53a16c1a6768a465bc8df3ada115735cc819 /manifests
parente7a1d738c9c95ff059fbaeff107d91a2e1742f8e (diff)
downloadpuppet-ekeyd-bd9fa966f4bbd46693548a95d818adb3dc8ef3eb.tar.gz
puppet-ekeyd-bd9fa966f4bbd46693548a95d818adb3dc8ef3eb.tar.bz2
do host stuff and set key with parametrized classes, but work around a bug in puppet regarding parametrized classes
Diffstat (limited to 'manifests')
-rw-r--r--manifests/base.pp2
-rw-r--r--manifests/host.pp10
-rw-r--r--manifests/init.pp17
3 files changed, 16 insertions, 13 deletions
diff --git a/manifests/base.pp b/manifests/base.pp
index 24494f4..94907ba 100644
--- a/manifests/base.pp
+++ b/manifests/base.pp
@@ -16,7 +16,7 @@ class ekeyd::base {
}
exec{'configure_ekey_key':
- command => "ekey-rekey `ekeydctl list | grep \"/dev/entropykey\" | awk -F, '{ print \$5}'` ${ekey_masterkey}",
+ command => "ekey-rekey `ekeydctl list | grep \"/dev/entropykey\" | awk -F, '{ print \$5}'` ${ekeyd::ekey_masterkey}",
unless => "ekeydctl list | grep -q 'Running OK'",
require => Service['ekeyd'],
}
diff --git a/manifests/host.pp b/manifests/host.pp
deleted file mode 100644
index 6b8dd1a..0000000
--- a/manifests/host.pp
+++ /dev/null
@@ -1,10 +0,0 @@
-class ekeyd::host inherits ekeyd {
- case $operatingsystem {
- centos: { include ekeyd::host::centos }
- default: { include ekeyd::host::base }
- }
-
- if $use_shorewall {
- include shorewall::rules::ekeyd
- }
-}
diff --git a/manifests/init.pp b/manifests/init.pp
index 8ef05d2..83ee949 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -1,7 +1,20 @@
-class ekeyd {
+class ekeyd(
+ $ekey_host = false,
+ $ekey_masterkey
+){
if $ekeyd_key_present != 'true' { fail("Can't find an ekey key plugged into usb on ${fqdn}") }
- if !$ekey_masterkey { fail("You need to define \$ekey_masterkey for ${fqdn}") }
include ekeyd::base
+
+ if $ekey_host {
+ case $operatingsystem {
+ centos: { include ekeyd::host::centos }
+ default: { include ekeyd::host::base }
+ }
+
+ if $use_shorewall {
+ include shorewall::rules::ekeyd
+ }
+ }
}