Browse Source

Issue #722: Updated grafana cred

Signed-off-by: blesson-james <blesson_james@Dellteam.com>
blesson-james 3 years ago
parent
commit
c0a6707589
1 changed files with 6 additions and 9 deletions
  1. 6 9
      roles/slurm_exporter/tasks/configure_grafana.yml

+ 6 - 9
roles/slurm_exporter/tasks/configure_grafana.yml

@@ -1,4 +1,4 @@
-#  Copyright 2021 Dell Inc. or its subsidiaries. All Rights Reserved.
+#  Copyright 2022 Dell Inc. or its subsidiaries. All Rights Reserved.
 #
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
@@ -13,15 +13,12 @@
 #  limitations under the License.
 ---
 
-- name: Include control_plane_monitoring variables
-  include_vars: "{{ role_path }}/../../control_plane/roles/control_plane_monitoring/vars/main.yml"
-
 - name: Create prometheus datasource in grafana
   community.grafana.grafana_datasource:
     name: "hpc-prometheus-{{ ansible_default_ipv4.address }}"
     grafana_url: "http://{{ grafana_svc_ip }}:{{ grafana_svc_port }}"
-    grafana_user: "{{ grafana_username }}"
-    grafana_password: "{{ grafana_password }}"
+    grafana_user: "{{ hostvars['127.0.0.1']['grafana_username'] }}"
+    grafana_password: "{{ hostvars['127.0.0.1']['grafana_password'] }}"
     ds_type: prometheus
     ds_url: "http://{{ ansible_default_ipv4.address }}"
     access: direct
@@ -53,12 +50,12 @@
 - name: Import Slurm Grafana dashboards
   community.grafana.grafana_dashboard:
     grafana_url: "http://{{ grafana_svc_ip }}:{{ grafana_svc_port }}"
-    grafana_user: "{{ grafana_username }}"
-    grafana_password: "{{ grafana_password }}"
+    grafana_user: "{{ hostvars['127.0.0.1']['grafana_username'] }}"
+    grafana_password: "{{ hostvars['127.0.0.1']['grafana_password'] }}"
     state: present
     commit_message: Updated by ansible
     overwrite: yes
     path: "{{ role_path }}/files/{{ item }}"
   with_items: "{{ slurm_dashboard_json_files }}"
   delegate_to: localhost
-  no_log: true
+  no_log: true