Skip to content

Commit 125669f

Browse files
committed
fix slurm_exporter for offline site playbook
1 parent 8a1615e commit 125669f

File tree

6 files changed

+14
-12
lines changed

6 files changed

+14
-12
lines changed

ansible/fatimage.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,9 @@
171171
when: "'openondemand' in group_names"
172172

173173
- name: slurm exporter
174-
import_role:
174+
include_role:
175175
name: slurm_exporter
176-
tasks_from: install
177-
vars:
178-
slurm_exporter_state: stopped
176+
tasks_from: install.yml
179177
when: "'slurm_exporter' in group_names"
180178

181179
- name: Install alertmanager

ansible/monitoring.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,10 @@
5454
tags: slurm_exporter
5555
environment: "{{ appliances_environment_vars }}"
5656
tasks:
57-
- import_role:
57+
- include_role:
5858
name: slurm_exporter
59+
tasks_from: "{{ 'configure.yml' if appliances_mode == 'configure' else 'main.yml' }}"
60+
5961

6062
- name: Setup core monitoring software
6163
hosts: prometheus
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
- name: Ensure slurm exporter state
2+
systemd:
3+
name: prometheus-slurm-exporter
4+
state: "{{ slurm_exporter_state }}"
5+
enabled: true
6+
when:
7+
- not ansible_check_mode

ansible/roles/slurm_exporter/tasks/install.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,3 @@
66

77
- meta: flush_handlers
88

9-
- name: Ensure slurm exporter state
10-
systemd:
11-
name: prometheus-slurm-exporter
12-
state: "{{ slurm_exporter_state }}"
13-
enabled: true
14-
when:
15-
- not ansible_check_mode
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
---
22
- import_tasks: install.yml
3+
- import_tasks: configure.yml

environments/common/inventory/group_vars/builder/defaults.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ tuned_started: false
2424
tuned_enabled: false
2525
sssd_started: false
2626
sssd_enabled: false
27+
slurm_exporter_state: stopped
2728
appliances_mode: build

0 commit comments

Comments
 (0)