diff options
author | mh <mh@immerda.ch> | 2011-07-27 18:41:27 +0200 |
---|---|---|
committer | mh <mh@immerda.ch> | 2011-07-27 18:41:27 +0200 |
commit | 16b06320cd3bb3121446717c05b6bc13ae2ff133 (patch) | |
tree | e2680d36bc4282d85e97fc294b0942367273dbde /lib/puppet/parser/functions/trocla_get.rb |
init of trocla module
Diffstat (limited to 'lib/puppet/parser/functions/trocla_get.rb')
-rw-r--r-- | lib/puppet/parser/functions/trocla_get.rb | 9 |
1 files changed, 9 insertions, 0 deletions
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 |