summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
+ }
+ }
}