lib/puppet/functions/postgresql/prepend_sql_password.rb
raw| 1 | # frozen_string_literal: true |
| 2 | |
| 3 | # @summary This function exists for usage of a role password that is a deferred function |
| 4 | Puppet::Functions.create_function(:'postgresql::prepend_sql_password') do |
| 5 | # @param password |
| 6 | # The clear text `password` |
| 7 | dispatch :default_impl do |
| 8 | required_param 'String', :password |
| 9 | return_type 'String' |
| 10 | end |
| 11 | def default_impl(password) |
| 12 | "ENCRYPTED PASSWORD '#{password}'" |
| 13 | end |
| 14 | end |