summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/functions/fqdn_rand.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/parser/functions/fqdn_rand.rb')
-rw-r--r--lib/puppet/parser/functions/fqdn_rand.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/puppet/parser/functions/fqdn_rand.rb b/lib/puppet/parser/functions/fqdn_rand.rb
index 27af2d7ca..3e7018ac4 100644
--- a/lib/puppet/parser/functions/fqdn_rand.rb
+++ b/lib/puppet/parser/functions/fqdn_rand.rb
@@ -1,9 +1,9 @@
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|
- require 'md5'
- max = args.shift
- srand MD5.new([lookupvar('fqdn'),args].join(':')).to_s.hex
- rand(max).to_s
+ "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|
+ require 'md5'
+ max = args.shift
+ srand MD5.new([lookupvar('fqdn'),args].join(':')).to_s.hex
+ rand(max).to_s
end