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.
2 parents ff32c58 + 821f0d6 commit 1095775Copy full SHA for 1095775
lib/facter/es_facts.rb
@@ -69,7 +69,7 @@ def self.run
69
response = http.get('/')
70
json_data = JSON.parse(response.body)
71
72
- if json_data['status'] && json_data['status'] == 200
+ if response.code == '200' && json_data['version'] && json_data['name']
73
add_fact(key_prefix, 'name', json_data['name'])
74
add_fact(key_prefix, 'version', json_data['version']['number'])
75
@@ -128,9 +128,8 @@ def self.run
128
end
129
Facter.add(:elasticsearch) do
130
setcode do
131
- nodes
+ nodes unless nodes.empty?
132
133
- nodes unless nodes.empty?
134
135
136
0 commit comments