From 139b3d373e3f021caa6f4226ac880b01fffb4f58 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sat, 25 Sep 2010 22:27:00 -0300 Subject: Support for sending pubkey by mail --- manifests/init.pp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/manifests/init.pp b/manifests/init.pp index a4e60ad..de91cc8 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -1,7 +1,7 @@ # This module is distributed under the GNU Affero General Public License: # # Monkeysphere module for puppet -# Copyright (C) 2009 Sarava Group +# Copyright (C) 2009-2010 Sarava Group # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -39,6 +39,14 @@ class monkeysphere { require => Package["monkeysphere"], } } + 'mail': { + exec { "/usr/sbin/monkeysphere-host import-key /etc/ssh/ssh_host_rsa_key $key && \ + /usr/bin/mail -s 'monkeysphere host pgp key for $fqdn' root < /var/lib/monkeysphere/host_keys.pub.pgp": + unless => "/usr/bin/gpg --homedir /var/lib/monkeysphere/host --list-keys '=$key' &> /dev/null", + user => "root", + require => Package["monkeysphere"], + } + } default: { exec { "/usr/sbin/monkeysphere-host import-key /etc/ssh/ssh_host_rsa_key $key && \ /usr/sbin/monkeysphere-host publish-key": -- cgit v1.2.3