Skip to content

Commit db30ca2

Browse files
committed
server: support arbiter node config introduced by PR#182
1 parent 8b7de22 commit db30ca2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

manifests/server.pp

+4-2
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
Optional[String] $replset = undef,
5454
Optional[Hash] $replset_config = undef,
5555
Optional[Array] $replset_members = undef,
56+
Optional[String] $replset_arbiter = undef,
5657
Optional[Boolean] $configsvr = undef,
5758
Optional[Boolean] $shardsvr = undef,
5859
Optional[Boolean] $rest = undef,
@@ -112,8 +113,8 @@
112113
# Set-up replicasets
113114
if $replset {
114115
# Check that we've got either a members array or a replset_config hash
115-
if $replset_members and $replset_config {
116-
fail('You can provide either replset_members or replset_config, not both.')
116+
if ( $replset_members or $replset_arbiter ) and $replset_config {
117+
fail('You can provide either replset_members incl. replset_arbiter or replset_config, not both.')
117118
} elsif !$replset_members and !$replset_config {
118119
# No members or config provided. Warn about it.
119120
warning('Replset specified, but no replset_members or replset_config provided.')
@@ -128,6 +129,7 @@
128129
"${replset}" => {
129130
'ensure' => 'present',
130131
'members' => $replset_members,
132+
'arbiter' => $replset_arbiter,
131133
},
132134
}
133135
}

0 commit comments

Comments
 (0)