File tree Expand file tree Collapse file tree 5 files changed +43
-33
lines changed Expand file tree Collapse file tree 5 files changed +43
-33
lines changed Original file line number Diff line number Diff line change 152152 tasks_from : install.yml
153153 when : " 'opensearch' in group_names"
154154
155- # slurm_stats - nothing to do
155+ - import_role :
156+ name : slurm_stats
157+ tasks_from : install.yml
158+ when : " 'slurm_stats' in group_names"
159+
156160 - import_role :
157161 name : filebeat
158162 tasks_from : install.yml
Original file line number Diff line number Diff line change 2121 tasks :
2222 - include_role :
2323 name : slurm_stats
24+ tasks_from : " {{ 'configure.yml' if appliances_mode == 'configure' else 'main.yml' }}"
2425
2526- name : Deploy filebeat
2627 hosts : filebeat
Original file line number Diff line number Diff line change 1+ ---
2+
3+ - name : Create a directory to house the log files
4+ file :
5+ state : directory
6+ path : /var/log/slurm-stats
7+ become : true
8+
9+ - name : Create cron job
10+ cron :
11+ name : Generate slurm stats
12+ minute : " */5"
13+ user : root
14+ # NOTE: lasttimestamp is stored at /root/lasttimestamp
15+ job : " TZ=UTC /opt/slurm-tools/bin/slurm-stats >> /var/log/slurm-stats/finished_jobs.json"
16+ cron_file : slurm-stats
17+ become : true
18+
19+ - name : Setup log rotate
20+ copy :
21+ content : |
22+ # WARNING: This file is managed by ansible, do not modify.
23+ /var/log/slurm-stats/finished_jobs.json {
24+ {{ slurm_stats_log_rotate_content_frequency }}
25+ rotate {{ slurm_stats_log_rotate_content_rotate }}
26+ compress
27+ delaycompress
28+ }
29+ dest : /etc/logrotate.d/slurm-stats
30+ become : true
Original file line number Diff line number Diff line change 1+ ---
2+
3+ - name : Setup slurm tools
4+ include_role :
5+ name : slurm_tools
Original file line number Diff line number Diff line change 11---
22
3- - name : Setup slurm tools
4- include_role :
5- name : slurm_tools
6-
7- - name : Create a directory to house the log files
8- file :
9- state : directory
10- path : /var/log/slurm-stats
11- become : true
12-
13- - name : Create cron job
14- cron :
15- name : Generate slurm stats
16- minute : " */5"
17- user : root
18- # NOTE: lasttimestamp is stored at /root/lasttimestamp
19- job : " TZ=UTC /opt/slurm-tools/bin/slurm-stats >> /var/log/slurm-stats/finished_jobs.json"
20- cron_file : slurm-stats
21- become : true
22-
23- - name : Setup log rotate
24- copy :
25- content : |
26- # WARNING: This file is managed by ansible, do not modify.
27- /var/log/slurm-stats/finished_jobs.json {
28- {{ slurm_stats_log_rotate_content_frequency }}
29- rotate {{ slurm_stats_log_rotate_content_rotate }}
30- compress
31- delaycompress
32- }
33- dest : /etc/logrotate.d/slurm-stats
34- become : true
3+ - include_tasks : install.yml
4+ - include_tasks : configure.yml
You can’t perform that action at this time.
0 commit comments