|
5 | 5 | Enum['ldap', 'mysql', 'bind', 'postgresql', 'sqlite'] $backend = 'mysql',
|
6 | 6 | Boolean $backend_install = true,
|
7 | 7 | Boolean $backend_create_tables = true,
|
8 |
| - Optional[String[1]] $db_root_password = undef, |
| 8 | + Powerdns::Secret $db_root_password = undef, |
9 | 9 | String[1] $db_username = 'powerdns',
|
10 |
| - Optional[String[1]] $db_password = undef, |
| 10 | + Powerdns::Secret $db_password = undef, |
11 | 11 | String[1] $db_name = 'powerdns',
|
12 | 12 | String[1] $db_host = 'localhost',
|
13 | 13 | Integer[1] $db_port = 3306,
|
|
18 | 18 | Optional[String[1]] $ldap_basedn = undef,
|
19 | 19 | String[1] $ldap_method = 'strict',
|
20 | 20 | Optional[String[1]] $ldap_binddn = undef,
|
21 |
| - Optional[String[1]] $ldap_secret = undef, |
| 21 | + Powerdns::Secret $ldap_secret = undef, |
22 | 22 | Boolean $custom_repo = false,
|
23 | 23 | Boolean $custom_epel = false,
|
24 | 24 | Pattern[/4\.[0-9]+/] $version = $::powerdns::params::version,
|
|
29 | 29 | # Do some additional checks. In certain cases, some parameters are no longer optional.
|
30 | 30 | if $authoritative {
|
31 | 31 | if ($::powerdns::backend != 'bind') and ($::powerdns::backend != 'ldap') and ($::powerdns::backend != 'sqlite') and $require_db_password {
|
32 |
| - assert_type(String[1], $db_password) |$expected, $actual| { |
| 32 | + assert_type(Variant[String[1], Sensitive[String[1]]], $db_password) |$expected, $actual| { |
33 | 33 | fail("'db_password' must be a non-empty string when 'authoritative' == true")
|
34 | 34 | }
|
35 | 35 | if $backend_install {
|
36 |
| - assert_type(String[1], $db_root_password) |$expected, $actual| { |
| 36 | + assert_type(Variant[String[1], Sensitive[String[1]]], $db_root_password) |$expected, $actual| { |
37 | 37 | fail("'db_root_password' must be a non-empty string when 'backend_install' == true")
|
38 | 38 | }
|
39 | 39 | }
|
40 | 40 | }
|
41 | 41 | if $backend_create_tables and $backend == 'mysql' {
|
42 |
| - assert_type(String[1], $db_root_password) |$expected, $actual| { |
| 42 | + assert_type(Variant[String[1], Sensitive[String[1]]], $db_root_password) |$expected, $actual| { |
43 | 43 | fail("On MySQL 'db_root_password' must be a non-empty string when 'backend_create_tables' == true")
|
44 | 44 | }
|
45 | 45 | }
|
|
0 commit comments