]> gitweb.fluxo.info Git - puppet-user.git/commitdiff
Managing GPG keys refreshing
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 20 Jan 2011 17:10:15 +0000 (15:10 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 20 Jan 2011 17:10:15 +0000 (15:10 -0200)
manifests/init.pp

index 756e16375e7b2cd2fbb79fbacda1e438d6ea8bc0..c381f1be49b2970122b644d249a50545449aca03 100644 (file)
@@ -22,7 +22,8 @@ class user {
     $sshkey_type      = 'absent',
     $membership       = 'minimum',
     $ticket           = false,
-    $tag              = false) {
+    $tag              = false,
+    $refresh_keys     = false) {
 
     if $password != 'absent' {
 
@@ -119,6 +120,17 @@ class user {
         tag        => $tag,
       }
 
+      if $refresh_keys == true {
+        cron { "gpg-refresh-keys-${title}":
+          command  => "/usr/bin/gpg --refresh-keys > /dev/null 2>&1",
+          user     => $title,
+          hour     => "*/1",
+          minute   => "0",
+          ensure   => present,
+          require  => User[$title],
+        }
+      }
+
       # lots of bugs preventing a good implementation for ssh keys
       # http://projects.reductivelabs.com/issues/1409
       # http://projects.reductivelabs.com/issues/2004