Skip to content

Commit 3f10171

Browse files
authored
Merge pull request #64 from bwilcox/node_manager_switch
Node manager switch
2 parents 3ae5a16 + b74390b commit 3f10171

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

manifests/setup/node_manager.pp

+12-4
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,22 @@
1212
# }'
1313
#
1414
class peadm::setup::node_manager (
15+
# Common
1516
String[1] $master_host,
16-
String[1] $puppetdb_database_host,
1717
String[1] $compiler_pool_address,
1818

19+
# High Availability
1920
Optional[String[1]] $master_replica_host = undef,
20-
Optional[String[1]] $puppetdb_database_replica_host = undef,
21+
22+
# For the next two parameters, the default values are appropriate when
23+
# deploying Standard or Large architectures. These values only need to be
24+
# specified differently when deploying an Extra Large architecture.
25+
26+
# Specify when using Extra Large
27+
String[1] $puppetdb_database_host = $master_host,
28+
29+
# Specify when using Extra Large AND High Availability
30+
Optional[String[1]] $puppetdb_database_replica_host = $master_replica_host,
2131
) {
2232

2333
##################################################
@@ -129,9 +139,7 @@
129139
},
130140
variables => { 'peadm_replica' => true },
131141
}
132-
}
133142

134-
if $puppetdb_database_replica_host {
135143
node_group { 'PE Master B':
136144
ensure => present,
137145
parent => 'PE Infrastructure',

plans/action/configure.pp

+1-4
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,7 @@
2525
$master_replica_target = peadm::get_targets($master_replica_host, 1)
2626
$puppetdb_database_replica_target = peadm::get_targets($puppetdb_database_replica_host, 1)
2727
$compiler_targets = peadm::get_targets($compiler_hosts)
28-
$puppetdb_database_target = $puppetdb_database_host ? {
29-
undef => $master_target,
30-
default => peadm::get_targets($puppetdb_database_host, 1)
31-
}
28+
$puppetdb_database_target = peadm::get_targets($puppetdb_database_host, 1)
3229

3330
# Ensure input valid for a supported architecture
3431
$arch = peadm::validate_architecture(

0 commit comments

Comments
 (0)