From 16b06320cd3bb3121446717c05b6bc13ae2ff133 Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 27 Jul 2011 18:41:27 +0200 Subject: init of trocla module --- lib/puppet/parser/functions/trocla_get.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 lib/puppet/parser/functions/trocla_get.rb (limited to 'lib/puppet/parser/functions/trocla_get.rb') diff --git a/lib/puppet/parser/functions/trocla_get.rb b/lib/puppet/parser/functions/trocla_get.rb new file mode 100644 index 0000000..ed8eeab --- /dev/null +++ b/lib/puppet/parser/functions/trocla_get.rb @@ -0,0 +1,9 @@ +module Puppet::Parser::Functions + newfunction(:trocla_get, :type => :rvalue) do |*args| + require File.dirname(__FILE__) + '/../../util/trocla_helper' + if (answer=Puppet::Util::TroclaHelper.trocla(:get_password,false,*args)).nil? + raise(Puppet::ParseError, "No password for key,format #{args.flatten.inspect} found!") + end + answer + end +end \ No newline at end of file -- cgit v1.2.3