|
13 | 13 | #
|
14 | 14 | # @param r10k_known_hosts
|
15 | 15 | # Puppet Enterprise 2023.3+ requires host key verification for the
|
16 |
| -# r10k_remote host. When setting \$r10k_private_key, you must also provide |
17 |
| -# \$r10k_known_hosts information in the form of an array of hashes with |
18 |
| -# 'name', 'type' and 'key' information for hostname, key-type and public key. |
| 16 | +# r10k_remote host when using ssh. When setting \$r10k_private_key, you must |
| 17 | +# also provide \$r10k_known_hosts information in the form of an array of |
| 18 | +# hashes with 'name', 'type' and 'key' information for hostname, key-type and |
| 19 | +# public key. |
19 | 20 | #
|
20 | 21 | # @param license_key_file
|
21 | 22 | # The license key to use with Puppet Enterprise. If this is a local file it
|
|
132 | 133 | # either be undef or else the key content to write.
|
133 | 134 | $r10k_private_key = peadm::file_or_content('r10k_private_key', $r10k_private_key_file, $r10k_private_key_content)
|
134 | 135 |
|
135 |
| - # Determine whether r10k_known_hosts is required and has been provided. |
136 |
| - $is_pe_2023_3_or_greater = (versioncmp($version, '2023.3.0') >= 0) |
137 |
| - if (($is_pe_2023_3_or_greater) and |
138 |
| - ($r10k_private_key =~ NotUndef) and |
139 |
| - ($r10k_known_hosts =~ Undef)) { |
140 |
| - fail_plan("In Puppet Enterprise 2023.3+ r10k 4.0 requires host key verification for the r10k_remote host. When setting \$r10k_private_key, you must also provide \$r10k_known_hosts information in the form of an array of hashes with 'name', 'type' and 'key' information for hostname, key-type and public key. Puppet Enterprise version: ${version}, r10k_known_hosts: ${r10k_known_hosts}") |
141 |
| - } |
142 |
| - $r10k_known_hosts_config = $r10k_known_hosts ? { |
143 |
| - undef => {}, |
144 |
| - default => { |
145 |
| - 'puppet_enterprise::profile::master::r10k_known_hosts' => $r10k_known_hosts, |
146 |
| - }, |
147 |
| - } |
148 |
| - |
149 | 136 | # Process user input for license key (same process as for r10k private key above).
|
150 | 137 | $license_key = peadm::file_or_content('license_key', $license_key_file, $license_key_content)
|
151 | 138 |
|
|
191 | 178 | undef => undef,
|
192 | 179 | default => '/etc/puppetlabs/puppetserver/ssh/id-control_repo.rsa',
|
193 | 180 | },
|
194 |
| - } + $r10k_known_hosts_config + $puppetdb_database_temp_config + $pe_conf_data) |
| 181 | + 'puppet_enterprise::profile::master::r10k_known_hosts' => $r10k_known_hosts, |
| 182 | + } + $puppetdb_database_temp_config + $pe_conf_data) |
195 | 183 |
|
196 | 184 | $primary_postgresql_pe_conf = peadm::generate_pe_conf({
|
197 | 185 | 'console_admin_password' => 'not used',
|
|
0 commit comments