summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-sysadm/2011-January/002154.html
diff options
context:
space:
mode:
Diffstat (limited to 'zarb-ml/mageia-sysadm/2011-January/002154.html')
-rw-r--r--zarb-ml/mageia-sysadm/2011-January/002154.html182
1 files changed, 182 insertions, 0 deletions
diff --git a/zarb-ml/mageia-sysadm/2011-January/002154.html b/zarb-ml/mageia-sysadm/2011-January/002154.html
new file mode 100644
index 000000000..7322e0de3
--- /dev/null
+++ b/zarb-ml/mageia-sysadm/2011-January/002154.html
@@ -0,0 +1,182 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<HTML>
+ <HEAD>
+ <TITLE> [Mageia-sysadm] [814] - add a module to generate gnupg key ( similar to the one for openssl
+ </TITLE>
+ <LINK REL="Index" HREF="index.html" >
+ <LINK REL="made" HREF="mailto:mageia-sysadm%40mageia.org?Subject=Re%3A%20%5BMageia-sysadm%5D%20%5B814%5D%20-%20add%20a%20module%20to%20generate%20gnupg%20key%20%28%0A%09similar%20to%20the%20one%20for%20openssl&In-Reply-To=%3C20110117152410.82E09427CD%40valstar.mageia.org%3E">
+ <META NAME="robots" CONTENT="index,nofollow">
+ <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
+ <LINK REL="Previous" HREF="002153.html">
+ <LINK REL="Next" HREF="002155.html">
+ </HEAD>
+ <BODY BGCOLOR="#ffffff">
+ <H1>[Mageia-sysadm] [814] - add a module to generate gnupg key ( similar to the one for openssl</H1>
+ <B>root at mageia.org</B>
+ <A HREF="mailto:mageia-sysadm%40mageia.org?Subject=Re%3A%20%5BMageia-sysadm%5D%20%5B814%5D%20-%20add%20a%20module%20to%20generate%20gnupg%20key%20%28%0A%09similar%20to%20the%20one%20for%20openssl&In-Reply-To=%3C20110117152410.82E09427CD%40valstar.mageia.org%3E"
+ TITLE="[Mageia-sysadm] [814] - add a module to generate gnupg key ( similar to the one for openssl">root at mageia.org
+ </A><BR>
+ <I>Mon Jan 17 16:24:10 CET 2011</I>
+ <P><UL>
+ <LI>Previous message: <A HREF="002153.html">[Mageia-sysadm] [813] add a new class to do a mirror of a svn reporitory ( for display purpose with viewvc or any others )
+</A></li>
+ <LI>Next message: <A HREF="002155.html">[Mageia-sysadm] [814] - add a module to generate gnupg key ( similar to the one for openssl
+</A></li>
+ <LI> <B>Messages sorted by:</B>
+ <a href="date.html#2154">[ date ]</a>
+ <a href="thread.html#2154">[ thread ]</a>
+ <a href="subject.html#2154">[ subject ]</a>
+ <a href="author.html#2154">[ author ]</a>
+ </LI>
+ </UL>
+ <HR>
+<!--beginarticle-->
+<PRE>Revision: 814
+Author: misc
+Date: 2011-01-17 16:24:10 +0100 (Mon, 17 Jan 2011)
+Log Message:
+-----------
+- add a module to generate gnupg key ( similar to the one for openssl
+ certs )
+
+Added Paths:
+-----------
+ puppet/modules/gnupg/
+ puppet/modules/gnupg/manifests/
+ puppet/modules/gnupg/manifests/init.pp
+ puppet/modules/gnupg/templates/
+ puppet/modules/gnupg/templates/batch
+ puppet/modules/gnupg/templates/create_gnupg_keys.sh
+
+Added: puppet/modules/gnupg/manifests/init.pp
+===================================================================
+--- puppet/modules/gnupg/manifests/init.pp (rev 0)
++++ puppet/modules/gnupg/manifests/init.pp 2011-01-17 15:24:10 UTC (rev 814)
+@@ -0,0 +1,54 @@
++class gnupg {
++ class client {
++ package { [&quot;gnupg&quot;,&quot;rng-utils&quot;]:
++ ensure =&gt; present,
++ }
++
++ file { [&quot;/etc/gnupg&quot;, &quot;/etc/gnupg/batches&quot;]:
++ ensure =&gt; directory,
++ }
++
++ file { &quot;/etc/gnupg/keys&quot;:
++ ensure =&gt; directory,
++ mode =&gt; 600,
++ owner =&gt; root,
++ group =&gt; root
++ }
++
++ file { &quot;/usr/local/bin/create_gnupg_keys.sh&quot;:
++ ensure =&gt; present,
++ owner =&gt; root,
++ group =&gt; root,
++ mode =&gt; 755,
++ content =&gt; template('gnupg/create_gnupg_keys.sh')
++ }
++ }
++
++ # debian recommend SHA2, with 4096
++ # <A HREF="http://wiki.debian.org/Keysigning">http://wiki.debian.org/Keysigning</A>
++ # as they are heavy users of gpg, I will tend
++ # to follow them
++ # however, for testing purpose, 4096 is too strong,
++ # this empty the entropy of my vm
++ define keys( $email,
++ $key_name,
++ $key_type = 'RSA',
++ $key_length = '1024',
++ $expire_date = '1m'
++ ) {
++
++ include gnupg::client
++ file { &quot;$name.batch&quot;:
++ ensure =&gt; present,
++ path =&gt; &quot;/etc/gnupg/batches/$name.batch&quot;,
++ content =&gt; template(&quot;gnupg/batch&quot;)
++ }
++
++ # TODO make sure the perm are good
++ exec { &quot;/usr/local/bin/create_gnupg_keys.sh $name&quot;:
++ user =&gt; root,
++ creates =&gt; &quot;/etc/gnupg/keys/$name.secring&quot;,
++ require =&gt; File[&quot;/etc/gnupg/batches/$name.batch&quot;]
++ }
++ }
++}
+
+Added: puppet/modules/gnupg/templates/batch
+===================================================================
+--- puppet/modules/gnupg/templates/batch (rev 0)
++++ puppet/modules/gnupg/templates/batch 2011-01-17 15:24:10 UTC (rev 814)
+@@ -0,0 +1,12 @@
++%echo Generating a standard key
++Key-Type: &lt;%= key_type %&gt;
++Key-Length: &lt;%= key_length %&gt;
++Name-Real: &lt;%= key_name %&gt;
++Name-Comment: Key made by puppet on &lt;%= fqdn %&gt;
++Name-Email: &lt;%= email %&gt;
++Expire-Date: &lt;%= expire_date %&gt;
++%pubring &lt;%= name %&gt;.pub
++%secring &lt;%= name %&gt;.sec
++%commit
++%echo done
++
+
+Added: puppet/modules/gnupg/templates/create_gnupg_keys.sh
+===================================================================
+--- puppet/modules/gnupg/templates/create_gnupg_keys.sh (rev 0)
++++ puppet/modules/gnupg/templates/create_gnupg_keys.sh 2011-01-17 15:24:10 UTC (rev 814)
+@@ -0,0 +1,13 @@
++#!/bin/bash
++
++NAME=$1
++
++/sbin/rngd -f -r /dev/urandom &amp;
++RAND=$!
++cd /etc/gnupg/keys/
++gpg --homedir /etc/gnupg/keys/ --batch --gen-key /etc/gnupg/batches/$NAME.batch
++EXIT=$?
++
++kill $RAND
++
++exit $EXIT
+-------------- next part --------------
+An HTML attachment was scrubbed...
+URL: &lt;/pipermail/mageia-sysadm/attachments/20110117/d4cbbe29/attachment-0001.html&gt;
+</PRE>
+
+
+
+
+
+
+
+
+
+
+
+
+<!--endarticle-->
+ <HR>
+ <P><UL>
+ <!--threads-->
+ <LI>Previous message: <A HREF="002153.html">[Mageia-sysadm] [813] add a new class to do a mirror of a svn reporitory ( for display purpose with viewvc or any others )
+</A></li>
+ <LI>Next message: <A HREF="002155.html">[Mageia-sysadm] [814] - add a module to generate gnupg key ( similar to the one for openssl
+</A></li>
+ <LI> <B>Messages sorted by:</B>
+ <a href="date.html#2154">[ date ]</a>
+ <a href="thread.html#2154">[ thread ]</a>
+ <a href="subject.html#2154">[ subject ]</a>
+ <a href="author.html#2154">[ author ]</a>
+ </LI>
+ </UL>
+
+<hr>
+<a href="https://www.mageia.org/mailman/listinfo/mageia-sysadm">More information about the Mageia-sysadm
+mailing list</a><br>
+</body></html>