Skip to content

Instantly share code, notes, and snippets.

@binford2k
Last active December 19, 2015 01:08
Show Gist options
  • Save binford2k/5873184 to your computer and use it in GitHub Desktop.
Save binford2k/5873184 to your computer and use it in GitHub Desktop.
# <modulepath>/<somemodule>/lib/puppet/parser/functions/my_fqdn_rand.rb
Puppet::Parser::Functions.newfunction(
:my_fqdn_rand,
:type => :rvalue,
:doc => 'runs on ruby 1.9!'
) do |args|
raise ArgumentError, 'my_fqdn_rand: accepts only one argument' if args != 1
function_fqdn_rand(args[0].to_i)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment