Skip to content

Commit b766033

Browse files
committed
fixup! fixup! fixup! fixup! fixup! Connect to localhost in provider when possible
1 parent 5655ceb commit b766033

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lib/puppet/provider/mongodb.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@ def self.conn_string
135135
"#{ip_real}:#{port_real}"
136136
end
137137

138+
def conn_string
139+
self.class.conn_string
140+
end
141+
138142
def self.db_ismaster
139143
cmd_ismaster = 'db.isMaster().ismaster'
140144
db = 'admin'

lib/puppet/provider/mongodb_replset/mongo.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,9 @@ def get_hosts_status(members)
155155
Puppet.debug "Checking replicaset member #{host} ..."
156156
begin
157157
status = if host.split(':').first == Facter.value(:fqdn)
158-
self.rs_status(conn_string)
158+
rs_status(conn_string)
159159
else
160-
self.rs_status(host)
160+
rs_status(host)
161161
end
162162

163163
if status.key?('set')

0 commit comments

Comments
 (0)