Skip to content

Commit 29fba5b

Browse files
committed
fixup! fixup! Connect to localhost in provider when possible
1 parent 9237bbb commit 29fba5b

File tree

1 file changed

+5
-5
lines changed
  • lib/puppet/provider/mongodb_replset

1 file changed

+5
-5
lines changed

lib/puppet/provider/mongodb_replset/mongo.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,11 @@ def get_hosts_status(members)
154154
host = member['host']
155155
Puppet.debug "Checking replicaset member #{host} ..."
156156
begin
157-
if host.split(':').first == Facter.value(:fqdn)
158-
status = rs_status(conn_string)
159-
else
160-
status = rs_status(host)
161-
end
157+
status = if host.split(':').first == Facter.value(:fqdn)
158+
rs_status(conn_string)
159+
else
160+
rs_status(host)
161+
end
162162

163163
if status.key?('set')
164164
raise Puppet::Error, "Can't configure replicaset #{name}, host #{host} is already part of another replicaset." if status['set'] != name

0 commit comments

Comments
 (0)