Create slurm log directory and rotate logs
This commit is contained in:
parent
388f666081
commit
1de5867980
|
@ -0,0 +1,23 @@
|
|||
##
|
||||
# Slurm Logrotate Configuration
|
||||
##
|
||||
/var/log/slurm/*.log {
|
||||
compress
|
||||
missingok
|
||||
nocopytruncate
|
||||
nocreate
|
||||
nodelaycompress
|
||||
nomail
|
||||
notifempty
|
||||
noolddir
|
||||
rotate 5
|
||||
sharedscripts
|
||||
size=32M
|
||||
create 640 slurm root
|
||||
postrotate
|
||||
for daemon in $(/usr/bin/scontrol show daemons)
|
||||
do
|
||||
killall -SIGUSR2 $daemon
|
||||
done
|
||||
endscript
|
||||
}
|
|
@ -53,12 +53,18 @@
|
|||
when: ansible_os_family == "RedHat"
|
||||
|
||||
# As of 17.11, this is only created if you install the example configs package
|
||||
- name: Create /etc/slurm (yum)
|
||||
- name: Create /etc/slurm
|
||||
file:
|
||||
path: /etc/slurm
|
||||
state: directory
|
||||
when: ansible_os_family == "RedHat"
|
||||
|
||||
- name: Install log rotation configuration
|
||||
copy:
|
||||
src: logrotate-slurm
|
||||
dest: /etc/logrotate.d/slurm
|
||||
when: ansible_os_family == "RedHat"
|
||||
|
||||
# FIXME: this task will fail if slurmservers[0] has not already completed the slurm.conf task that follows it
|
||||
- name: Acquire hostlist
|
||||
command: scontrol show hostlist {{ groups[item.inventory_group] | join(",") }}
|
||||
|
|
|
@ -27,3 +27,11 @@
|
|||
state: directory
|
||||
notify:
|
||||
- reload slurmd
|
||||
|
||||
- name: Create slurm log directory
|
||||
file:
|
||||
path: "/var/log/{{ slurm_log_dir_name }}"
|
||||
owner: slurm
|
||||
group: slurm
|
||||
mode: 0755
|
||||
state: directory
|
||||
|
|
Loading…
Reference in New Issue