mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-12 15:05:07 +00:00
Reformat everything.
This commit is contained in:
parent
3f2213791a
commit
340ff8586d
1008 changed files with 61301 additions and 58309 deletions
|
|
@ -71,7 +71,6 @@ from ansible_collections.community.general.plugins.module_utils.influxdb import
|
|||
|
||||
|
||||
class AnsibleInfluxDBRead(InfluxDb):
|
||||
|
||||
def read_by_query(self, query):
|
||||
client = self.connect_to_influxdb()
|
||||
try:
|
||||
|
|
@ -85,19 +84,16 @@ class AnsibleInfluxDBRead(InfluxDb):
|
|||
def main():
|
||||
argument_spec = InfluxDb.influxdb_argument_spec()
|
||||
argument_spec.update(
|
||||
query=dict(type='str', required=True),
|
||||
database_name=dict(required=True, type='str'),
|
||||
)
|
||||
module = AnsibleModule(
|
||||
argument_spec=argument_spec,
|
||||
supports_check_mode=True
|
||||
query=dict(type="str", required=True),
|
||||
database_name=dict(required=True, type="str"),
|
||||
)
|
||||
module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True)
|
||||
|
||||
influx = AnsibleInfluxDBRead(module)
|
||||
query = module.params.get('query')
|
||||
query = module.params.get("query")
|
||||
results = influx.read_by_query(query)
|
||||
module.exit_json(changed=True, query_results=results)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue