}
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'],
}
+++ /dev/null
-class ekeyd::host inherits ekeyd {
- case $operatingsystem {
- centos: { include ekeyd::host::centos }
- default: { include ekeyd::host::base }
- }
-
- if $use_shorewall {
- include shorewall::rules::ekeyd
- }
-}
-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
+ }
+ }
}