influx bucket module

This commit is contained in:
2021-05-25 14:58:40 +02:00
parent c26e962898
commit f9e29a4e30
2 changed files with 165 additions and 4 deletions

View File

@@ -23,7 +23,7 @@ options:
description: influxdb2 organisation
type: str
required: True
token:
auth_token:
description: influxdb2 authentication token
type: str
required: True
@@ -51,7 +51,7 @@ EXAMPLES = r'''
influx_dashboard:
base: "http://localhost:8086"
org: "my-org"
token: "{{influx_token_fetch.stdout_lines[0]}}"
auth_token: "{{influx_token_fetch.stdout_lines[0]}}"
data: "{{lookup('file', 'influxdb-dashboard-cobald.json')}}"
'''
@@ -126,7 +126,7 @@ if __name__ == "__main__":
argument_spec=dict(
base=dict(type="str", required=True),
org=dict(type="str", required=True),
token=dict(type="str", required=True),
auth_token=dict(type="str", required=True),
data=dict(type="json", required=True),
force=dict(type="bool", default=False),
),
@@ -134,7 +134,7 @@ if __name__ == "__main__":
)
dashboard = parse_dashboard_template(module.params["data"])
auth = get_auth(module.params["base"], module.params["org"],
module.params["token"])
module.params["auth_token"])
changed, x = check(module.params["base"], auth, dashboard)
result['changed'] = changed