We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9237bbb commit 29fba5bCopy full SHA for 29fba5b
lib/puppet/provider/mongodb_replset/mongo.rb
@@ -154,11 +154,11 @@ def get_hosts_status(members)
154
host = member['host']
155
Puppet.debug "Checking replicaset member #{host} ..."
156
begin
157
- if host.split(':').first == Facter.value(:fqdn)
158
- status = rs_status(conn_string)
159
- else
160
- status = rs_status(host)
161
- end
+ status = if host.split(':').first == Facter.value(:fqdn)
+ rs_status(conn_string)
+ else
+ rs_status(host)
+ end
162
163
if status.key?('set')
164
raise Puppet::Error, "Can't configure replicaset #{name}, host #{host} is already part of another replicaset." if status['set'] != name
0 commit comments