|
46 | 46 | Hash $pe_conf_data = {},
|
47 | 47 |
|
48 | 48 | # Code Manager
|
49 |
| - Optional[Boolean] $code_manager_auto_configure = true, |
| 49 | + Optional[Boolean] $code_manager_auto_configure = undef, |
50 | 50 | Optional[String] $r10k_remote = undef,
|
51 | 51 | Optional[String] $r10k_private_key_file = undef,
|
52 | 52 | Optional[Peadm::Pem] $r10k_private_key_content = undef,
|
|
125 | 125 | # either be undef or else the key content to write.
|
126 | 126 | $r10k_private_key = peadm::file_or_content('r10k_private_key', $r10k_private_key_file, $r10k_private_key_content)
|
127 | 127 |
|
| 128 | + # enable code manager if it isn't explicitly disabled *and* the user provided r10k repo+key |
| 129 | + if $r10k_private_key and $code_manager_auto_configure { |
| 130 | + $_code_manager_auto_configure = true |
| 131 | + } else { |
| 132 | + $_code_manager_auto_configure = $code_manager_auto_configure |
| 133 | + } |
| 134 | + |
128 | 135 | # Same for license key
|
129 | 136 | $license_key = peadm::file_or_content('license_key', $license_key_file, $license_key_content)
|
130 | 137 |
|
|
164 | 171 | 'puppet_enterprise::puppet_master_host' => $primary_target.peadm::certname(),
|
165 | 172 | 'pe_install::puppet_master_dnsaltnames' => $dns_alt_names,
|
166 | 173 | 'puppet_enterprise::puppetdb_database_host' => $primary_postgresql_target.peadm::certname(),
|
167 |
| - 'puppet_enterprise::profile::master::code_manager_auto_configure' => $code_manager_auto_configure, |
| 174 | + 'puppet_enterprise::profile::master::code_manager_auto_configure' => $_code_manager_auto_configure, |
168 | 175 | 'puppet_enterprise::profile::master::r10k_remote' => $r10k_remote,
|
169 | 176 | 'puppet_enterprise::profile::master::r10k_private_key' => $r10k_private_key ? {
|
170 | 177 | undef => undef,
|
171 | 178 | default => '/etc/puppetlabs/puppetserver/ssh/id-control_repo.rsa',
|
172 | 179 | },
|
173 |
| - } + $puppetdb_database_temp_config + $pe_conf_data) |
| 180 | + }.delete_undef_values + $puppetdb_database_temp_config + $pe_conf_data) |
| 181 | + out::message("########## primary_pe_conf ##########") |
| 182 | + out::message($primary_pe_conf) |
| 183 | + out::message("########## primary_pe_conf ##########") |
174 | 184 |
|
175 | 185 | $primary_postgresql_pe_conf = peadm::generate_pe_conf({
|
176 | 186 | 'console_admin_password' => 'not used',
|
|
0 commit comments