|
1 | 1 | # This profile is not intended to be continously enforced on PE masters.
|
2 | 2 | # Rather, it describes state to enforce as a boostrap action, preparing the
|
3 | 3 | # Puppet Enterprise console with a sane default environment configuration.
|
4 |
| -# Importantly, this includes assigning nodes to an environment matching thier |
5 |
| -# trusted.extensions.pp_environment value by default. |
6 | 4 | #
|
7 | 5 | # This class will be applied during master bootstrap using e.g.
|
8 | 6 | #
|
|
49 | 47 | # We modify this group's rule such that all PE infrastructure nodes will be
|
50 | 48 | # members.
|
51 | 49 | node_group { 'PE Infrastructure Agent':
|
52 |
| - rule => ['and', ['~', ['trusted', 'extensions', 'pp_application'], '^puppet/']], |
| 50 | + rule => ['and', ['~', ['trusted', 'extensions', peadm::oid('peadm_role')], '^puppet/']], |
53 | 51 | }
|
54 | 52 |
|
55 | 53 | # We modify this group to add, as data, the compiler_pool_address only.
|
|
58 | 56 | node_group { 'PE Master':
|
59 | 57 | parent => 'PE Infrastructure',
|
60 | 58 | rule => ['or',
|
61 |
| - ['and', ['=', ['trusted', 'extensions', 'pp_application'], 'puppet/compiler']], |
| 59 | + ['and', ['=', ['trusted', 'extensions', peadm::oid('peadm_role')], 'puppet/compiler']], |
62 | 60 | ['=', 'name', $master_host],
|
63 | 61 | ],
|
64 | 62 | data => {
|
|
77 | 75 | parent => 'PE Infrastructure',
|
78 | 76 | environment => 'production',
|
79 | 77 | override_environment => false,
|
80 |
| - rule => ['and', ['=', ['trusted', 'extensions', 'pp_application'], 'puppet/puppetdb-database']], |
| 78 | + rule => ['and', ['=', ['trusted', 'extensions', peadm::oid('peadm_role')], 'puppet/puppetdb-database']], |
81 | 79 | classes => {
|
82 | 80 | 'puppet_enterprise::profile::database' => { },
|
83 | 81 | },
|
|
90 | 88 | ensure => present,
|
91 | 89 | parent => 'PE Infrastructure',
|
92 | 90 | rule => ['and',
|
93 |
| - ['=', ['trusted', 'extensions', 'pp_application'], 'puppet/master'], |
94 |
| - ['=', ['trusted', 'extensions', 'pp_cluster'], 'A'], |
| 91 | + ['=', ['trusted', 'extensions', peadm::oid('peadm_role')], 'puppet/master'], |
| 92 | + ['=', ['trusted', 'extensions', peadm::oid('peadm_availability_group')], 'A'], |
95 | 93 | ],
|
96 | 94 | data => {
|
97 | 95 | 'puppet_enterprise::profile::primary_master_replica' => {
|
|
109 | 107 | ensure => 'present',
|
110 | 108 | parent => 'PE Master',
|
111 | 109 | rule => ['and',
|
112 |
| - ['=', ['trusted', 'extensions', 'pp_application'], 'puppet/compiler'], |
113 |
| - ['=', ['trusted', 'extensions', 'pp_cluster'], 'A'], |
| 110 | + ['=', ['trusted', 'extensions', peadm::oid('peadm_role')], 'puppet/compiler'], |
| 111 | + ['=', ['trusted', 'extensions', peadm::oid('peadm_availability_group')], 'A'], |
114 | 112 | ],
|
115 | 113 | classes => {
|
116 | 114 | 'puppet_enterprise::profile::puppetdb' => {
|
|
144 | 142 | ensure => present,
|
145 | 143 | parent => 'PE Infrastructure',
|
146 | 144 | rule => ['and',
|
147 |
| - ['=', ['trusted', 'extensions', 'pp_application'], 'puppet/master'], |
148 |
| - ['=', ['trusted', 'extensions', 'pp_cluster'], 'B'], |
| 145 | + ['=', ['trusted', 'extensions', peadm::oid('peadm_role')], 'puppet/master'], |
| 146 | + ['=', ['trusted', 'extensions', peadm::oid('peadm_availability_group')], 'B'], |
149 | 147 | ],
|
150 | 148 | data => {
|
151 | 149 | 'puppet_enterprise::profile::primary_master_replica' => {
|
|
161 | 159 | ensure => 'present',
|
162 | 160 | parent => 'PE Master',
|
163 | 161 | rule => ['and',
|
164 |
| - ['=', ['trusted', 'extensions', 'pp_application'], 'puppet/compiler'], |
165 |
| - ['=', ['trusted', 'extensions', 'pp_cluster'], 'B'], |
| 162 | + ['=', ['trusted', 'extensions', peadm::oid('peadm_role')], 'puppet/compiler'], |
| 163 | + ['=', ['trusted', 'extensions', peadm::oid('peadm_availability_group')], 'B'], |
166 | 164 | ],
|
167 | 165 | classes => {
|
168 | 166 | 'puppet_enterprise::profile::puppetdb' => {
|
|
0 commit comments