|
1 | 1 | # @api private
|
2 | 2 | class peadm::setup::legacy_compiler_group (
|
3 | 3 | String[1] $primary_host,
|
4 |
| - Optional[String] $internal_compiler_a_pool_address = undef, |
5 |
| - Optional[String] $internal_compiler_b_pool_address = undef, |
| 4 | + Optional[String] $internal_compiler_a_pool_address = undef, |
| 5 | + Optional[String] $internal_compiler_b_pool_address = undef, |
6 | 6 | ) {
|
7 | 7 | Node_group {
|
8 | 8 | purge_behavior => none,
|
9 | 9 | }
|
10 | 10 |
|
11 | 11 | node_group { 'PE Legacy Compiler':
|
12 |
| - parent => 'PE Master', |
13 |
| - rule => ['and', |
14 |
| - ['=', ['trusted', 'extensions', peadm::oid('peadm_legacy_compiler')], 'true'], |
15 |
| - ['=', ['trusted', 'extensions', 'pp_auth_role'], 'pe_compiler'], |
16 |
| - ], |
17 |
| - classes => { |
18 |
| - 'puppet_enterprise::profile::master' => { |
19 |
| - 'puppetdb_host' => [$internal_compiler_a_pool_address, $internal_compiler_b_pool_address].filter |$_| { $_ }, |
20 |
| - 'puppetdb_port' => [8081], |
| 12 | + ensure => 'present', |
| 13 | + parent => 'PE Master', |
| 14 | + purge_behavior => 'classes', |
| 15 | + rule => ['=', ['trusted', 'extensions', 'pp_auth_role'], 'legacy_compiler'], |
| 16 | + classes => { |
| 17 | + 'puppet_enterprise::profile::master' => { |
| 18 | + 'puppetdb_host' => [$internal_compiler_a_pool_address, $internal_compiler_b_pool_address].filter |$_| { $_ }, |
| 19 | + 'puppetdb_port' => [8081], |
| 20 | + 'replication_mode' => 'none', |
| 21 | + 'code_manager_auto_configure' => true, |
21 | 22 | },
|
22 | 23 | },
|
23 | 24 | }
|
24 | 25 |
|
25 | 26 | node_group { 'PE Legacy Compiler Group A':
|
26 |
| - ensure => 'present', |
27 |
| - parent => 'PE Legacy Compiler', |
28 |
| - rule => ['and', |
29 |
| - ['=', ['trusted', 'extensions', 'pp_auth_role'], 'pe_compiler'], |
| 27 | + ensure => 'present', |
| 28 | + parent => 'PE Legacy Compiler', |
| 29 | + purge_behavior => 'classes', |
| 30 | + rule => ['and', |
| 31 | + ['=', ['trusted', 'extensions', 'pp_auth_role'], 'legacy_compiler'], |
30 | 32 | ['=', ['trusted', 'extensions', peadm::oid('peadm_availability_group')], 'A'],
|
31 |
| - ['=', ['trusted', 'extensions', peadm::oid('peadm_legacy_compiler')], 'true'], |
32 | 33 | ],
|
33 |
| - classes => { |
34 |
| - 'puppet_enterprise::profile::master' => { |
| 34 | + classes => { |
| 35 | + 'puppet_enterprise::profile::master' => { |
35 | 36 | 'puppetdb_host' => [$internal_compiler_b_pool_address, $internal_compiler_a_pool_address].filter |$_| { $_ },
|
36 | 37 | 'puppetdb_port' => [8081],
|
37 | 38 | },
|
38 | 39 | },
|
39 |
| - data => { |
40 |
| - # Workaround for GH-118 |
| 40 | + data => { |
41 | 41 | 'puppet_enterprise::profile::master::puppetdb' => {
|
42 | 42 | 'ha_enabled_replicas' => [],
|
43 | 43 | },
|
44 | 44 | },
|
45 | 45 | }
|
46 | 46 |
|
47 | 47 | node_group { 'PE Legacy Compiler Group B':
|
48 |
| - ensure => 'present', |
49 |
| - parent => 'PE Legacy Compiler', |
50 |
| - rule => ['and', |
51 |
| - ['=', ['trusted', 'extensions', 'pp_auth_role'], 'pe_compiler'], |
| 48 | + ensure => 'present', |
| 49 | + parent => 'PE Legacy Compiler', |
| 50 | + purge_behavior => 'classes', |
| 51 | + rule => ['and', |
| 52 | + ['=', ['trusted', 'extensions', 'pp_auth_role'], 'legacy_compiler'], |
52 | 53 | ['=', ['trusted', 'extensions', peadm::oid('peadm_availability_group')], 'B'],
|
53 |
| - ['=', ['trusted', 'extensions', peadm::oid('peadm_legacy_compiler')], 'true'], |
54 | 54 | ],
|
55 |
| - classes => { |
56 |
| - 'puppet_enterprise::profile::master' => { |
| 55 | + classes => { |
| 56 | + 'puppet_enterprise::profile::master' => { |
57 | 57 | 'puppetdb_host' => [$internal_compiler_a_pool_address, $internal_compiler_b_pool_address].filter |$_| { $_ },
|
58 | 58 | 'puppetdb_port' => [8081],
|
59 | 59 | },
|
60 | 60 | },
|
61 |
| - data => { |
62 |
| - # Workaround for GH-118 |
| 61 | + data => { |
63 | 62 | 'puppet_enterprise::profile::master::puppetdb' => {
|
64 | 63 | 'ha_enabled_replicas' => [],
|
65 | 64 | },
|
66 | 65 | },
|
67 | 66 | }
|
68 | 67 |
|
69 | 68 | node_group { 'PE Compiler':
|
70 |
| - rule => ['and', ['=', ['trusted', 'extensions', peadm::oid('peadm_legacy_compiler')], 'false']], |
| 69 | + rule => ['=', ['trusted', 'extensions', 'pp_auth_role'], 'pe_compiler'], |
71 | 70 | }
|
72 | 71 | }
|
0 commit comments