Skip to content

Commit

Permalink
Merge branch 'main' into auto-bump-grafana
Browse files Browse the repository at this point in the history
  • Loading branch information
rndmh3ro authored Apr 16, 2024
2 parents 8061593 + 25453f2 commit 409c142
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 16 deletions.
3 changes: 3 additions & 0 deletions changelogs/fragments/353-docs-add-influxdb-flux-example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
trivial:
- grafana_datasource - (docs) add influxdb v2 flux example
3 changes: 3 additions & 0 deletions changelogs/fragments/355-rm-dashboard-message-argument.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
removed_features:
- removed deprecated `message` argument in `grafana_dashboard`
17 changes: 1 addition & 16 deletions plugins/modules/grafana_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@
description:
- Set a commit message for the version history.
- Only used when C(state) is C(present).
- C(message) alias is deprecated in Ansible 2.10, since it is used internally by Ansible Core Engine.
aliases: [ 'message' ]
type: str
extends_documentation_fragment:
- community.grafana.basic_auth
Expand Down Expand Up @@ -620,15 +618,7 @@ def main():
dashboard_id=dict(type="str"),
dashboard_revision=dict(type="str", default="1"),
overwrite=dict(type="bool", default=False),
commit_message=dict(
type="str",
aliases=["message"],
deprecated_aliases=[
dict(
name="message", version="2.0.0", collection_name="community.grafana"
)
],
),
commit_message=dict(type="str"),
)
module = AnsibleModule(
argument_spec=argument_spec,
Expand All @@ -647,11 +637,6 @@ def main():

module.params["url"] = clean_url(module.params["url"])

if "message" in module.params:
module.fail_json(
msg="'message' is reserved keyword, please change this parameter to 'commit_message'"
)

try:
if module.params["state"] == "present":
result = grafana_create_dashboard(module, module.params)
Expand Down
17 changes: 17 additions & 0 deletions plugins/modules/grafana_datasource.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,23 @@
time_interval: ">10s"
tls_ca_cert: "/etc/ssl/certs/ca.pem"
- name: Create influxdbv2 datasource using fluxql
community.grafana.grafana_datasource:
name: "datasource-influxdb-flux"
grafana_url: "https://grafana.company.com"
grafana_user: "admin"
grafana_password: "xxxxxx"
org_id: "1"
ds_type: "influxdb"
ds_url: "https://influx.company.com:8086"
additional_json_data:
version: "Flux"
organization: "organization"
defaultBucket: "bucket"
tlsSkipVerify: false
additional_secure_json_data:
token: "token"
- name: Create postgres datasource
community.grafana.grafana_datasource:
name: "datasource-postgres"
Expand Down

0 comments on commit 409c142

Please sign in to comment.