|
81 | 81 |
|
82 | 82 | # PE Compiler group comes from default PE and already has the pe compiler role |
83 | 83 | node_group { 'PE Compiler': |
84 | | - parent => 'PE Master', |
85 | | - rule => ['and', ['=', ['trusted', 'extensions', peadm::oid('pp_auth_role')], 'pe_compiler']], |
| 84 | + parent => 'PE Master', |
| 85 | + purge_behavior => 'rule', |
| 86 | + rule => ['and', ['=', ['trusted', 'extensions', 'pp_auth_role'], 'pe_compiler']], |
86 | 87 | } |
87 | 88 |
|
88 | 89 | # This group should pin the primary, and also map to any pe-postgresql nodes |
|
116 | 117 | # Configure the A pool for compilers. There are up to two pools for DR, each |
117 | 118 | # having an affinity for one "availability zone" or the other. |
118 | 119 | node_group { 'PE Compiler Group A': |
119 | | - ensure => 'present', |
120 | | - parent => 'PE Compiler', |
121 | | - rule => ['and', |
| 120 | + ensure => 'present', |
| 121 | + purge_behavior => 'rule', |
| 122 | + parent => 'PE Compiler', |
| 123 | + rule => ['and', |
122 | 124 | ['=', ['trusted', 'extensions', 'pp_auth_role'], 'pe_compiler'], |
123 | 125 | ['=', ['trusted', 'extensions', peadm::oid('peadm_availability_group')], 'A'], |
124 | 126 | ], |
125 | | - classes => { |
| 127 | + classes => { |
126 | 128 | 'puppet_enterprise::profile::puppetdb' => { |
127 | 129 | 'database_host' => pick($postgresql_a_host, $notconf), |
128 | 130 | }, |
|
133 | 135 | 'puppetdb_port' => [8081], |
134 | 136 | }, |
135 | 137 | }, |
136 | | - data => { |
| 138 | + data => { |
137 | 139 | # Workaround for GH-118 |
138 | 140 | 'puppet_enterprise::profile::master::puppetdb' => { |
139 | 141 | 'ha_enabled_replicas' => [], |
|
174 | 176 | } |
175 | 177 |
|
176 | 178 | node_group { 'PE Compiler Group B': |
177 | | - ensure => 'present', |
178 | | - parent => 'PE Compiler', |
179 | | - rule => ['and', |
| 179 | + ensure => 'present', |
| 180 | + purge_behavior => 'rule', |
| 181 | + parent => 'PE Compiler', |
| 182 | + rule => ['and', |
180 | 183 | ['=', ['trusted', 'extensions', 'pp_auth_role'], 'pe_compiler'], |
181 | 184 | ['=', ['trusted', 'extensions', peadm::oid('peadm_availability_group')], 'B'], |
182 | 185 | ], |
183 | | - classes => { |
| 186 | + classes => { |
184 | 187 | 'puppet_enterprise::profile::puppetdb' => { |
185 | 188 | 'database_host' => pick($postgresql_b_host, $notconf), |
186 | 189 | }, |
|
191 | 194 | 'puppetdb_port' => [8081], |
192 | 195 | }, |
193 | 196 | }, |
194 | | - data => { |
| 197 | + data => { |
195 | 198 | # Workaround for GH-118 |
196 | 199 | 'puppet_enterprise::profile::master::puppetdb' => { |
197 | 200 | 'ha_enabled_replicas' => [], |
|
200 | 203 | } |
201 | 204 |
|
202 | 205 | node_group { 'PE Legacy Compiler': |
203 | | - parent => 'PE Master', |
204 | | - rule => ['=', ['trusted', 'extensions', 'pp_auth_role'], 'pe_compiler_legacy'], |
205 | | - classes => { |
| 206 | + parent => 'PE Master', |
| 207 | + purge_behavior => 'rule', |
| 208 | + rule => ['=', ['trusted', 'extensions', 'pp_auth_role'], 'pe_compiler_legacy'], |
| 209 | + classes => { |
206 | 210 | 'puppet_enterprise::profile::master' => { |
207 | 211 | 'puppetdb_host' => [$internal_compiler_a_pool_address, $internal_compiler_b_pool_address].filter |$_| { $_ }, |
208 | 212 | 'puppetdb_port' => [8081], |
|
213 | 217 | # Configure the A pool for legacy compilers. There are up to two pools for DR, each |
214 | 218 | # having an affinity for one "availability zone" or the other. |
215 | 219 | node_group { 'PE Legacy Compiler Group A': |
216 | | - ensure => 'present', |
217 | | - parent => 'PE Legacy Compiler', |
218 | | - rule => ['and', |
| 220 | + ensure => 'present', |
| 221 | + parent => 'PE Legacy Compiler', |
| 222 | + purge_behavior => 'rule', |
| 223 | + rule => ['and', |
219 | 224 | ['=', ['trusted', 'extensions', 'pp_auth_role'], 'pe_compiler_legacy'], |
220 | 225 | ['=', ['trusted', 'extensions', peadm::oid('peadm_availability_group')], 'A'], |
221 | 226 | ], |
222 | | - classes => { |
| 227 | + classes => { |
223 | 228 | 'puppet_enterprise::profile::master' => { |
224 | 229 | 'puppetdb_host' => [$internal_compiler_b_pool_address, $internal_compiler_a_pool_address].filter |$_| { $_ }, |
225 | 230 | 'puppetdb_port' => [8081], |
226 | 231 | }, |
227 | 232 | }, |
228 | | - data => { |
| 233 | + data => { |
229 | 234 | # Workaround for GH-118 |
230 | 235 | 'puppet_enterprise::profile::master::puppetdb' => { |
231 | 236 | 'ha_enabled_replicas' => [], |
|
236 | 241 | # Configure the B pool for legacy compilers. There are up to two pools for DR, each |
237 | 242 | # having an affinity for one "availability zone" or the other. |
238 | 243 | node_group { 'PE Legacy Compiler Group B': |
239 | | - ensure => 'present', |
240 | | - parent => 'PE Legacy Compiler', |
241 | | - rule => ['and', |
| 244 | + ensure => 'present', |
| 245 | + parent => 'PE Legacy Compiler', |
| 246 | + purge_behavior => 'rule', |
| 247 | + rule => ['and', |
242 | 248 | ['=', ['trusted', 'extensions', 'pp_auth_role'], 'pe_compiler_legacy'], |
243 | 249 | ['=', ['trusted', 'extensions', peadm::oid('peadm_availability_group')], 'B'], |
244 | 250 | ], |
245 | | - classes => { |
| 251 | + classes => { |
246 | 252 | 'puppet_enterprise::profile::master' => { |
247 | 253 | 'puppetdb_host' => [$internal_compiler_a_pool_address, $internal_compiler_a_pool_address].filter |$_| { $_ }, |
248 | 254 | 'puppetdb_port' => [8081], |
249 | 255 | }, |
250 | 256 | }, |
251 | | - data => { |
| 257 | + data => { |
252 | 258 | # Workaround for GH-118 |
253 | 259 | 'puppet_enterprise::profile::master::puppetdb' => { |
254 | 260 | 'ha_enabled_replicas' => [], |
|
0 commit comments