aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2010-09-25 22:27:00 -0300
committerSilvio Rhatto <rhatto@riseup.net>2010-09-25 22:27:00 -0300
commit139b3d373e3f021caa6f4226ac880b01fffb4f58 (patch)
treec15ebd44677065c8e34bd011523150b2246dedbf /manifests
parent28ee8f4e7d762bdc5eb061f2bbfad35a9dff7037 (diff)
downloadpuppet-monkeysphere-139b3d373e3f021caa6f4226ac880b01fffb4f58.tar.gz
puppet-monkeysphere-139b3d373e3f021caa6f4226ac880b01fffb4f58.tar.bz2
Support for sending pubkey by mail
Diffstat (limited to 'manifests')
-rw-r--r--manifests/init.pp10
1 files changed, 9 insertions, 1 deletions
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":