[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 2.6.5rc1-120-g2247c80
Paul Berry
paul at puppetlabs.com
Mon Feb 7 06:42:27 UTC 2011
The following commit has been merged in the upstream branch:
commit a732a15a0fd43ce983474cae4c298a9bbd86329f
Author: James Turnbull <james at lovedthanlost.net>
Date: Wed Dec 15 23:39:12 2010 +1100
Fixed #5564 - Added some more fqdn_rand documentation
Reviewed-by: Paul Berry <paul at puppetlabs.com>
diff --git a/lib/puppet/parser/functions/fqdn_rand.rb b/lib/puppet/parser/functions/fqdn_rand.rb
index 3e7018a..52946f2 100644
--- a/lib/puppet/parser/functions/fqdn_rand.rb
+++ b/lib/puppet/parser/functions/fqdn_rand.rb
@@ -1,7 +1,10 @@
Puppet::Parser::Functions::newfunction(:fqdn_rand, :type => :rvalue, :doc =>
- "Generates random numbers based on the node's fqdn. The first argument
- sets the range. Additional (optional) arguments may be used to further
- distinguish the seed.") do |args|
+ "Generates random numbers based on the node's fqdn. Generated random values
+ will be a range from 0 up to and excluding n, where n is the first parameter.
+ The second argument specifies a number to add to the seed and is optional, for example:
+
+ $random_number = fqdn_rand(30)
+ $random_number_seed = fqdn_rand(30,30)") do |args|
require 'md5'
max = args.shift
srand MD5.new([lookupvar('fqdn'),args].join(':')).to_s.hex
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list