blob: 487d1fdeebb65813e8c8e69515ea0eec50d464cc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
module Puppet::Parser::Functions
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
|