12345678910111213141516171819202122232425262728293031323334353637383940 |
- ---
- - name: Download and untar prometheus stable version
- unarchive:
- src: "{{ prometheus_git_repo }}"
- dest: "{{ installation_dir }}"
- remote_src: yes
- - name: Copy prometheus executable to /usr/local/bin
- copy:
- src: "{{ prometheus_exec_path }}"
- dest: "{{ system_local_path }}"
- remote_src: yes
- mode: "{{ file_permission }}"
- - name: Configure prometheus for slurm exporter
- blockinfile:
- path: "{{ prometheus_config_file }}"
- insertafter: EOF
- mode: "{{ file_permission }}"
- block: |
- # SLURM resource manager:
- - job_name: 'my_slurm_exporter'
- scrape_interval: 30s
- scrape_timeout: 30s
- static_configs:
- - targets: ['localhost:8080']
|