Переглянути джерело

Merge pull request #823 from sakshiarora13/devel

Issue#822: Slurm installation fix for multiple tasks
Sujit Jadhav 3 роки тому
батько
коміт
0faffe50aa

+ 1 - 8
roles/k8s_start_services/tasks/main.yml

@@ -21,14 +21,7 @@
 - name: Check K8s pods
   include_tasks: check_k8s_pods.yml
   tags: install
-
-- name: Install community.grafana collection
-  command: ansible-galaxy collection install community.grafana
-  changed_when: True
-  tags: install
-  delegate_to: localhost
-  when: hostvars['127.0.0.1']['control_plane_status']
-
+  
 - name: Configure Nginx/Prometheus/Grafana
   include_tasks: configure_nginx_prom_grafana.yml
   when:

+ 2 - 2
roles/k8s_start_services/vars/main.yml

@@ -99,9 +99,9 @@ nginx_conf_file_path: /etc/nginx/nginx.conf
 
 nginx_conf_file_mode: 2534
 
-grafana_svc_ip: "{{ lookup('ini', 'ip section=grafana_svc file={{ role_path }}/files/grafana_svc_details.ini') }}"
+grafana_svc_ip: "{{ lookup('ini', 'ip section=grafana_svc file={{ playbook_dir }}/roles/k8s_start_services/files/grafana_svc_details.ini') }}"
 
-grafana_svc_port: "{{ lookup('ini', 'port section=grafana_svc file={{ role_path }}/files/grafana_svc_details.ini') }}"
+grafana_svc_port: "{{ lookup('ini', 'port section=grafana_svc file={{ playbook_dir }}/roles/k8s_start_services/files/grafana_svc_details.ini') }}"
 
 opensuse_os_name: "openSUSE Leap"
 

+ 0 - 7
roles/slurm_exporter/tasks/main.yml

@@ -38,13 +38,6 @@
     - "'kubernetes' in ansible_skip_tags"
     - "'No such file' in k8s_installation_status.stderr"
 
-- name: Install community.grafana collection
-  command: ansible-galaxy collection install community.grafana
-  changed_when: True
-  tags: install
-  delegate_to: localhost
-  when: hostvars['127.0.0.1']['control_plane_status']
-
 - name: Configure grafana dashboard
   include_tasks: configure_grafana.yml
   when:

+ 1 - 0
roles/slurm_exporter/vars/main.yml

@@ -31,6 +31,7 @@ prometheus_inst_path: "/var/lib/prometheus-2.23.0.linux-amd64/"
 prometheus_exec_path: "{{ prometheus_inst_path }}/prometheus"
 system_local_path: "/usr/local/bin"
 prometheus_config_file: "{{ prometheus_inst_path }}/prometheus.yml"
+opensuse_os_name: "openSUSE Leap"
 
 #Usage: start_service.yml
 file_permission: "0755"

+ 6 - 0
telemetry/roles/slurm_telemetry/tasks/get_node_inventory.yml

@@ -18,6 +18,12 @@
     src: "{{ role_path }}/files/monster"
     dest: "{{ slurm_telemetry_code_dir }}"
     mode: "{{ slurm_telemetry_code_dir_mode }}"
+    
+- name: Install jmepath
+  pip:
+    name: jmespath
+    state: present
+    executable: pip3
 
 - name: Get AWX service IP
   command: kubectl get svc awx-ui -n {{ awx_namespace }} -o=jsonpath='{.spec.clusterIP}'