From 237d7fa76533bf504bbec2a57cad7c96410688ec Mon Sep 17 00:00:00 2001 From: david Date: Thu, 2 Aug 2007 09:28:47 +0000 Subject: moved puppet functions to common::puppetmaster git-svn-id: http://club.black.co.at:82/svn/manifests/trunk@154 f03ff2f1-f02d-0410-970d-b9634babeaa1 --- files/functions/gsub.rb | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 files/functions/gsub.rb (limited to 'files/functions/gsub.rb') diff --git a/files/functions/gsub.rb b/files/functions/gsub.rb new file mode 100644 index 0000000..743a700 --- /dev/null +++ b/files/functions/gsub.rb @@ -0,0 +1,7 @@ +# generic gsub call +module Puppet::Parser::Functions + newfunction(:gsub, :type => :rvalue) do |args| + args[0].gsub(/#{args[1]}/, args[2]) + end +end + -- cgit v1.2.3