From d9a3c7617a402a19f7114d9b262d62b3a7b7b24c Mon Sep 17 00:00:00 2001 From: David Schmitt Date: Sat, 6 Oct 2007 10:11:47 +0200 Subject: common: remove hand made plugins install defines and use matt's plugins patch This moves all facts and puppet plugins to the plugins/ directory of modules to get the benefits of Matt's plugins patch, that distributes these files before the configuration is requested. This reduces the number of configuration runs to convergence by one. --- plugins/puppet/parser/functions/gsub.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 plugins/puppet/parser/functions/gsub.rb (limited to 'plugins/puppet/parser/functions/gsub.rb') diff --git a/plugins/puppet/parser/functions/gsub.rb b/plugins/puppet/parser/functions/gsub.rb new file mode 100644 index 0000000..371820f --- /dev/null +++ b/plugins/puppet/parser/functions/gsub.rb @@ -0,0 +1,13 @@ +# generic gsub call +module Puppet::Parser::Functions + newfunction(:gsub, :type => :rvalue) do |args| + if args[0].is_a?(Array) + args[0].collect do |val| + val.gsub(/#{args[1]}/, args[2]) + end + else + args[0].gsub(/#{args[1]}/, args[2]) + end + end +end + -- cgit v1.2.3