Skip to content

Commit

Permalink
fix: added missing module parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
Nemental committed Jan 17, 2024
1 parent dcd8015 commit eee53fb
Showing 1 changed file with 57 additions and 25 deletions.
82 changes: 57 additions & 25 deletions roles/grafana/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
url: "{{ grafana_url }}"
url_username: "{{ grafana_username }}"
url_password: "{{ grafana_password }}"
use_proxy: "{{ grafana_use_proxy | default(omit) }}"
validate_certs: "{{ grafana_validate_certs | default(omit) }}"
block:
- name: Manage organization # noqa: args[module]
community.grafana.grafana_organization:
Expand All @@ -16,52 +18,82 @@

- name: Manage datasource
community.grafana.grafana_datasource:
tls_skip_verify: "{{ datasource.tls_skip_verify | default(omit) }}"
org_id: "{{ datasource.org_id | default(omit) }}"
org_name: "{{ datasource.org_name | default(omit) }}"
name: "{{ datasource.name }}"
ds_type: "{{ datasource.ds_type | default(omit) }}"
access: "{{ datasource.access | default(omit) }}"
ds_url: "{{ datasource.ds_url | default(omit) }}"
additional_json_data: "{{ datasource.additional_json_data | default(omit) }}"
additional_secure_json_data: "{{ datasource.additional_secure_json_data | default(omit) }}"
aws_access_key: "{{ datasource.aws_access_key | default(omit) }}"
aws_assume_role_arn: "{{ datasource.aws_assume_role_arn | default(omit) }}"
aws_auth_type: "{{ datasource.aws_auth_type | default(omit) }}"
aws_credentials_profile: "{{ datasource.aws_credentials_profile | default(omit) }}"
aws_custom_metrics_namespaces: "{{ datasource.aws_custom_metrics_namespaces | default(omit) }}"
aws_default_region: "{{ datasource.aws_default_region | default(omit) }}"
aws_secret_key: "{{ datasource.aws_secret_key | default(omit) }}"
azure_client: "{{ datasource.azure_client | default(omit) }}"
azure_cloud: "{{ datasource.azure_cloud | default(omit) }}"
azure_secret: "{{ datasource.azure_secret | default(omit) }}"
azure_tenant: "{{ datasource.azure_tenant | default(omit) }}"
basic_auth_password: "{{ datasource.basic_auth_password | default(omit) }}"
basic_auth_user: "{{ datasource.basic_auth_user | default(omit) }}"
database: "{{ datasource.database | default(omit) }}"
with_credentials: "{{ datasource.with_credentials | default(omit) }}"
ds_type: "{{ datasource.ds_type | default(omit) }}"
ds_url: "{{ datasource.ds_url | default(omit) }}"
enforce_secure_data: "{{ datasource.enforce_secure_data | default(omit) }}"
es_version: "{{ datasource.es_version | default(omit) }}"
interval: "{{ datasource.interval | default(omit) }}"
is_default: "{{ datasource.is_default | default(omit) }}"
user: "{{ datasource.user | default(omit) }}"
max_concurrent_shard_requests: "{{ datasource.max_concurrent_shard_requests | default(omit) }}"
name: "{{ datasource.name }}"
org_id: "{{ datasource.org_id | default(omit) }}"
org_name: "{{ datasource.org_name | default(omit) }}"
password: "{{ datasource.password | default(omit) }}"
additional_json_data: "{{ datasource.additional_json_data | default(omit) }}"
additional_secure_json_data: "{{ datasource.additional_secure_json_data | default(omit) }}"
sslmode: "{{ datasource.sslmode | default(omit) }}"
state: "{{ datasource.state | default(omit) }}"
time_field: "{{ datasource.time_field | default(omit) }}"
time_interval: "{{ datasource.time_interval | default(omit) }}"
tls_ca_cert: "{{ datasource.tls_ca_cert | default(omit) }}"
tls_client_cert: "{{ datasource.tls_client_cert | default(omit) }}"
tls_client_key: "{{ datasource.tls_client_key | default(omit) }}"
tls_skip_verify: "{{ datasource.tls_skip_verify | default(omit) }}"
trends: "{{ datasource.trends | default(omit) }}"
tsdb_resolution: "{{ datasource.tsdb_resolution | default(omit) }}"
tsdb_version: "{{ datasource.tsdb_version | default(omit) }}"
uid: "{{ datasource.uid | default(omit) }}"
user: "{{ datasource.user | default(omit) }}"
with_credentials: "{{ datasource.with_credentials | default(omit) }}"
zabbix_password: "{{ datasource.zabbix_password | default(omit) }}"
zabbix_user: "{{ datasource.zabbix_user | default(omit) }}"
loop: "{{ grafana_datasources }}"
loop_control: {loop_var: datasource}
tags: datasource

- name: Manage folder # noqa: args[module]
community.grafana.grafana_folder:
name: "{{ folder.name }}"
state: "{{ folder.state | default(omit) }}"
skip_version_check: "{{ folder.skip_version_check | default(omit) }}"
state: "{{ folder.state | default(omit) }}"
loop: "{{ grafana_folders }}"
loop_control: {loop_var: folder}
tags: folder

- name: Manage team # noqa: args[module]
community.grafana.grafana_team:
name: "{{ team.name }}"
email: "{{ team.email }}"
members: "{{ team.members | default(omit) }}"
state: "{{ team.state | default(omit) }}"
enforce_members: "{{ team.enforce_members | default(omit) }}"
members: "{{ team.members | default(omit) }}"
name: "{{ team.name }}"
skip_version_check: "{{ team.skip_version_check | default(omit) }}"
state: "{{ team.state | default(omit) }}"
loop: "{{ grafana_teams }}"
loop_control: {loop_var: team}
tags: team

- name: Manage user # noqa: args[module]
community.grafana.grafana_user:
name: "{{ user.name }}"
email: "{{ user.email | default(omit) }}"
is_admin: "{{ user.is_admin | default(omit) }}"
login: "{{ user.login }}"
name: "{{ user.name }}"
password: "{{ user.password | default(omit) }}"
is_admin: "{{ user.is_admin | default(omit) }}"
state: "{{ user.state | default(omit) }}"
loop: "{{ grafana_users }}"
loop_control: {loop_var: user}
Expand All @@ -70,27 +102,27 @@
- name: Manage organization users
community.grafana.grafana_organization_user:
login: "{{ organization_user.login }}"
role: "{{ organization_user.role | default(omit) }}"
state: "{{ organization_user.state | default(omit) }}"
org_id: "{{ organization_user.org_id | default(omit) }}"
org_name: "{{ organization_user.org_name | default(omit) }}"
role: "{{ organization_user.role | default(omit) }}"
state: "{{ organization_user.state | default(omit) }}"
loop: "{{ grafana_organization_users }}"
loop_control: {loop_var: organization_user}
tags: organization_user

- name: Manage dashboard
community.grafana.grafana_dashboard:
commit_message: "{{ dashboard.commit_message | default(omit) }}"
dashboard_id: "{{ dashboard.dashboard_id | default(omit) }}"
dashboard_revision: "{{ dashboard.dashboard_revision | default(omit) }}"
folder: "{{ dashboard.folder | default(omit) }}"
org_id: "{{ dashboard.org_id | default(omit) }}"
org_name: "{{ dashboard.org_name | default(omit) }}"
folder: "{{ dashboard.folder | default(omit) }}"
state: "{{ dashboard.state | default(omit) }}"
overwrite: "{{ dashboard.overwrite | default(omit) }}"
path: "{{ dashboard.path | default(omit) }}"
slug: "{{ dashboard.slug | default(omit) }}"
state: "{{ dashboard.state | default(omit) }}"
uid: "{{ dashboard.uid | default(omit) }}"
path: "{{ dashboard.path | default(omit) }}"
overwrite: "{{ dashboard.overwrite | default(omit) }}"
dashboard_id: "{{ dashboard.dashboard_id | default(omit) }}"
dashboard_revision: "{{ dashboard.dashboard_revision | default(omit) }}"
commit_message: "{{ dashboard.commit_message | default(omit) }}"
loop: "{{ grafana_dashboards }}"
loop_control: {loop_var: dashboard}
tags: [dashboard, molecule-idempotence-notest]

0 comments on commit eee53fb

Please sign in to comment.