]> gitweb.fluxo.info Git - puppet-monkeysphere.git/commitdiff
Support for sending pubkey by mail
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 26 Sep 2010 01:27:00 +0000 (22:27 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 26 Sep 2010 01:27:00 +0000 (22:27 -0300)
manifests/init.pp

index a4e60ad3cbacf5f74b25685f5e96a4cc4cb8eb3b..de91cc8d503e91d7715a4bbfddc6199c9fd4c874 100644 (file)
@@ -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":