Skip to content

Commit 248bb5d

Browse files
bwilcoxreidmv
authored andcommitted
Address issue where group B wasn't created when a master replica was present without a standalone puppetdb replica.
1 parent 3ae5a16 commit 248bb5d

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

manifests/setup/node_manager.pp

+21
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,9 @@
148148
},
149149
},
150150
}
151+
}
151152

153+
if ($puppetdb_database_replica_host) {
152154
node_group { 'PE Compiler Group B':
153155
ensure => 'present',
154156
parent => 'PE Master',
@@ -167,6 +169,25 @@
167169
},
168170
data => $compiler_data,
169171
}
172+
} elsif ($master_replica_host) {
173+
node_group { 'PE Compiler Group B':
174+
ensure => 'present',
175+
parent => 'PE Master',
176+
rule => ['and',
177+
['=', ['trusted', 'extensions', 'pp_application'], 'puppet/compiler'],
178+
['=', ['trusted', 'extensions', 'pp_cluster'], 'B'],
179+
],
180+
classes => {
181+
'puppet_enterprise::profile::puppetdb' => {
182+
'database_host' => $puppetdb_database_host,
183+
},
184+
'puppet_enterprise::profile::master' => {
185+
'puppetdb_host' => ['${clientcert}', $master_host], # lint:ignore:single_quote_string_with_variables
186+
'puppetdb_port' => [8081],
187+
}
188+
},
189+
data => $compiler_data,
190+
}
170191
}
171192

172193
}

0 commit comments

Comments
 (0)