[Lsb-messages] /var/www/bzr/lsb/devel/puppet-lsb r32: Finish puppet auto-update from version control.

Jeff Licquia licquia at linuxfoundation.org
Sun Jan 22 22:37:31 UTC 2012


------------------------------------------------------------
revno: 32
committer: Jeff Licquia <licquia at linuxfoundation.org>
branch nick: puppet-lsb
timestamp: Sun 2012-01-22 17:37:31 -0500
message:
  Finish puppet auto-update from version control.
modified:
  manifests/site.pp
  modules/puppet/files/puppet-email-notify
  modules/puppet/manifests/server.pp
  modules/sudo/files/sudoers/lsb1.linux-foundation.org
-------------- next part --------------
=== modified file 'manifests/site.pp'
--- a/manifests/site.pp	2012-01-18 14:39:29 +0000
+++ b/manifests/site.pp	2012-01-22 22:37:31 +0000
@@ -1,4 +1,13 @@
 # Top-level Puppet site configuration file.
 
+# Global settings.
+
+Mailalias { notify => Exec['newaliases'] }
+
+exec { newaliases:
+    path => [ '/usr/bin', '/usr/sbin' ],
+    refreshonly => true,
+}
+
 # Import node configuration.
 import 'nodes'

=== modified file 'modules/puppet/files/puppet-email-notify'
--- a/modules/puppet/files/puppet-email-notify	2012-01-22 19:49:32 +0000
+++ b/modules/puppet/files/puppet-email-notify	2012-01-22 22:37:31 +0000
@@ -16,7 +16,7 @@
 ROOT_CMD=sudo
 
 # Version control command to use for the update
-VC_UPDATE="bzr update -q"
+VC_UPDATE="/usr/bin/bzr update -q"
 
 # End of configuration
 
@@ -33,8 +33,10 @@
 done
 
 if [ $found_list_id = "yes" -a $found_subject = "yes" ]; then
+    logger -t puppet-update received puppet update notification email; updating
     cd /etc/puppet
-    $ROOT_CMD $VC_UPDATE
+    $ROOT_CMD $VC_UPDATE || \
+      logger -t puppet-update error updating
 fi
 
 exit 0

=== modified file 'modules/puppet/manifests/server.pp'
--- a/modules/puppet/manifests/server.pp	2012-01-22 19:49:32 +0000
+++ b/modules/puppet/manifests/server.pp	2012-01-22 22:37:31 +0000
@@ -8,10 +8,16 @@
     File['puppet.conf'] { source => undef }
 
     # Config auto-update, based on email notifications.
+    # Requires that sudo be configured to allow the MTA user
+    # to run "/usr/bin/bzr update -q" as root.
 
     file { '/usr/local/bin/puppet-email-notify':
         source => [ "puppet:///modules/puppet/puppet-email-notify" ],
         mode => 0755,
     }
 
+    mailalias ( 'puppet-notify':
+        recipient => '|/usr/local/bin/puppet-email-notify',
+    }
+
 }

=== modified file 'modules/sudo/files/sudoers/lsb1.linux-foundation.org'
--- a/modules/sudo/files/sudoers/lsb1.linux-foundation.org	2012-01-22 22:09:53 +0000
+++ b/modules/sudo/files/sudoers/lsb1.linux-foundation.org	2012-01-22 22:37:31 +0000
@@ -40,3 +40,5 @@
 # User privilege specification
 root	ALL = (ALL) ALL
 lfadmin	ALL = (ALL) ALL 
+
+postfix ALL = (root) NOPASSWD: /usr/bin/bzr update -q



More information about the lsb-messages mailing list