[2.5] influxdb_query: fix use of common return (#42231)

* influxdb_query: fix use of common return results (#39626)


(cherry picked from commit aa874c3c36)

* changelog: influxdb_query fix use of common return
pull/42207/head
René Moser 6 years ago committed by Matt Davis
parent 7dc06bed83
commit eda69dff92

@ -0,0 +1,2 @@
bugfixes:
- "influxdb_query - fixed the use of the common return 'results' caused an unexpected fault. The return is renamed to 'query_results'"

@ -52,11 +52,11 @@ EXAMPLES = r'''
- name: Print results from the query - name: Print results from the query
debug: debug:
var: connection.results var: connection.query_results
''' '''
RETURN = ''' RETURN = '''
results: query_results:
description: Result from the query description: Result from the query
returned: success returned: success
type: list type: list
@ -96,7 +96,7 @@ def main():
influx = AnsibleInfluxDBRead(module) influx = AnsibleInfluxDBRead(module)
query = module.params.get('query') query = module.params.get('query')
results = influx.read_by_query(query) results = influx.read_by_query(query)
module.exit_json(changed=True, results=results) module.exit_json(changed=True, query_results=results)
if __name__ == '__main__': if __name__ == '__main__':

Loading…
Cancel
Save