1 class entropykey::provider {
3 "ekeyd": ensure => installed;
7 "/etc/entropykey/ekeyd.conf":
8 source => "puppet:///modules/entropykey/ekeyd.conf",
9 notify => Exec['restart_ekeyd'],
10 require => [ Package['ekeyd'] ],
12 # our CRL expires after a while (2 or 4 weeks?), so we have
13 # to restart stunnel so it loads the new CRL.
14 "/etc/cron.weekly/stunnel-ekey-restart":
15 content => "# This file is under puppet control\nenv -i /etc/init.d/stunnel4 restart puppet-ekeyd\n",
22 command => "true && cd / && env -i /etc/init.d/ekeyd restart",
23 require => [ File['/etc/entropykey/ekeyd.conf'] ],
29 stunnel4::stunnel_server {
32 connect => "127.0.0.1:8888",
37 class entropykey::local_consumer {
39 "ekeyd-egd-linux": ensure => installed;
43 "/etc/default/ekeyd-egd-linux":
44 source => "puppet:///modules/entropykey/ekeyd-egd-linux",
45 notify => Exec['restart_ekeyd-egd-linux'],
46 require => [ Package['ekeyd-egd-linux'] ],
51 "restart_ekeyd-egd-linux":
52 command => "true && cd / && env -i /etc/init.d/ekeyd-egd-linux restart",
53 require => [ File['/etc/default/ekeyd-egd-linux'] ],
59 class entropykey::remote_consumer inherits entropykey::local_consumer {
61 stunnel4::stunnel_client {
63 accept => "127.0.0.1:8888",
64 connecthost => "${entropy_provider}",
71 case getfromhash($nodeinfo, 'entropy_key') {
72 true: { include entropykey::provider }
75 $entropy_provider = entropy_provider($fqdn, $nodeinfo)
76 case $entropy_provider {
78 local: { include entropykey::local_consumer }
79 default: { include entropykey::remote_consumer }
86 # vim:set shiftwidth=4: