File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -43,13 +43,12 @@ def get_options_from_config(file)
4343 file = mongod_conf_file
4444 if file
4545 options = get_options_from_config ( file )
46- e = File . exist? ( '/root/.mongorc.js' ) ? 'load(\'/root/.mongorc.js\'); ' : ''
4746
4847 # Check if the mongodb server is responding:
49- Facter ::Core ::Execution . exec ( "mongo --quiet #{ options } --eval \" #{ e } printjson(db.adminCommand({ ping: 1 }))\" " )
48+ Facter ::Core ::Execution . exec ( "mongo --quiet #{ options } --eval \" printjson(db.adminCommand({ ping: 1 }))\" " )
5049
5150 if $CHILD_STATUS. success?
52- Facter ::Core ::Execution . exec ( "mongo --quiet #{ options } --eval \" #{ e } db.isMaster().ismaster\" " )
51+ Facter ::Core ::Execution . exec ( "mongo --quiet #{ options } --eval \" db.isMaster().ismaster\" " )
5352 else
5453 'not_responding'
5554 end
Original file line number Diff line number Diff line change @@ -137,7 +137,6 @@ def self.conn_string
137137
138138 def self . db_ismaster
139139 cmd_ismaster = 'db.isMaster().ismaster'
140- cmd_ismaster = mongorc_file + cmd_ismaster if mongorc_file
141140 db = 'admin'
142141 res = mongo_cmd ( db , conn_string , cmd_ismaster ) . to_s . split ( %r{\n } ) . last . chomp
143142 res . eql? ( 'true' )
You can’t perform that action at this time.
0 commit comments