From bc832963baa281d707f7ac139b8dee67f9028068 Mon Sep 17 00:00:00 2001 From: Jethro van Ginkel Date: Wed, 25 Jan 2023 15:52:40 +0100 Subject: [PATCH] Add sets_creation so we can disable this class on Arbitrator servers while auth is enabled --- manifests/replset.pp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/manifests/replset.pp b/manifests/replset.pp index c08fbb999..79f71acc2 100644 --- a/manifests/replset.pp +++ b/manifests/replset.pp @@ -1,8 +1,16 @@ -# Wrapper class useful for hiera based deployments +# +# @summary Wrapper class useful for hiera based deployments +# +# @param sets_creation +# Boolean to disable mongodb_replset resource, we can use it to skipt this on Arbiter nodes that will produce an error when enabled +# @param sets +# Hash containing the replica set config +# class mongodb::replset ( - $sets = undef + Boolean $sets_creation = true, + Optional[Hash] $sets = undef, ) { - if $sets { + if $sets and $sets_creation { create_resources(mongodb_replset, $sets) }