diff options
author | mh <mh@immerda.ch> | 2011-08-03 19:25:06 +0200 |
---|---|---|
committer | mh <mh@immerda.ch> | 2011-08-03 19:25:06 +0200 |
commit | 20fdb3bcc7201bc86cfbddc269fe807a8e418963 (patch) | |
tree | 904a04d30422d7a224044846cc2f362e7c7f754a /lib/puppet/parser/functions/trocla.rb | |
parent | 7374cf944fbc1b52c438ce7e5345f94427ea876e (diff) |
update doc
Diffstat (limited to 'lib/puppet/parser/functions/trocla.rb')
-rw-r--r-- | lib/puppet/parser/functions/trocla.rb | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/lib/puppet/parser/functions/trocla.rb b/lib/puppet/parser/functions/trocla.rb index 9fa06bb..487d1fd 100644 --- a/lib/puppet/parser/functions/trocla.rb +++ b/lib/puppet/parser/functions/trocla.rb @@ -1,7 +1,29 @@ module Puppet::Parser::Functions - newfunction(:trocla, :type => :rvalue) do |*args| + newfunction(:trocla, :type => :rvalue, :doc => " +This will create or get a random password from the trocla storage. + +Usage: + + $password_user1 = trocla(key,[format='plain'[,options={}]]) + +Means: + + $password_user1 = trocla('user1') + +Create or get the plain text password for the key 'user1' + + $password_user2 = trocla('user2','mysql') + +Create or get the mysql style sha1 hashed password. + + $options_user3 = { 'username' => 'user3' } # Due to a puppet bug + # this needs to be assigned + # like that. + $password_user3 = trocla('user3','pgsql', $options_user3) + " + ) do |*args| require File.dirname(__FILE__) + '/../../util/trocla_helper' Puppet::Util::TroclaHelper.trocla(:password,true,*args) end -end
\ No newline at end of file +end |