Puppet Function: mongodb_password

Defined in:
lib/puppet/parser/functions/mongodb_password.rb
Function type:
Ruby 3.x API

Overview

mongodb_password()Any

Returns the mongodb password hash from the clear text password.

Returns:

  • (Any)


4
5
6
7
8
9
10
11
12
13
# File 'lib/puppet/parser/functions/mongodb_password.rb', line 4

newfunction(:mongodb_password, :type => :rvalue, :doc => <<-EOS
  Returns the mongodb password hash from the clear text password.
  EOS
) do |args|

  raise(Puppet::ParseError, 'mongodb_password(): Wrong number of arguments ' +
    "given (#{args.size} for 2)") if args.size != 2

  Puppet::Util::MongodbMd5er.md5(args[0],args[1])
end