|
150 | 150 | }
|
151 | 151 | }
|
152 | 152 |
|
153 |
| - if ($puppetdb_database_replica_host) { |
154 |
| - node_group { 'PE Compiler Group B': |
155 |
| - ensure => 'present', |
156 |
| - parent => 'PE Master', |
157 |
| - rule => ['and', |
158 |
| - ['=', ['trusted', 'extensions', 'pp_application'], 'puppet/compiler'], |
159 |
| - ['=', ['trusted', 'extensions', 'pp_cluster'], 'B'], |
160 |
| - ], |
161 |
| - classes => { |
162 |
| - 'puppet_enterprise::profile::puppetdb' => { |
163 |
| - 'database_host' => $puppetdb_database_replica_host, |
164 |
| - }, |
165 |
| - 'puppet_enterprise::profile::master' => { |
166 |
| - 'puppetdb_host' => ['${clientcert}', $master_host], # lint:ignore:single_quote_string_with_variables |
167 |
| - 'puppetdb_port' => [8081], |
168 |
| - } |
169 |
| - }, |
170 |
| - data => $compiler_data, |
| 153 | + if ($puppetdb_database_replica_host) or ($master_replica_host) { |
| 154 | + if ($puppetdb_database_replica_host) { |
| 155 | + $dbhost = $puppetdb_database_replica_host |
| 156 | + } else { |
| 157 | + $dbhost = $puppetdb_database_host |
171 | 158 | }
|
172 |
| - } elsif ($master_replica_host) { |
173 | 159 | node_group { 'PE Compiler Group B':
|
174 | 160 | ensure => 'present',
|
175 | 161 | parent => 'PE Master',
|
|
179 | 165 | ],
|
180 | 166 | classes => {
|
181 | 167 | 'puppet_enterprise::profile::puppetdb' => {
|
182 |
| - 'database_host' => $puppetdb_database_host, |
| 168 | + 'database_host' => $dbhost, |
183 | 169 | },
|
184 | 170 | 'puppet_enterprise::profile::master' => {
|
185 | 171 | 'puppetdb_host' => ['${clientcert}', $master_host], # lint:ignore:single_quote_string_with_variables
|
|
0 commit comments