Skip to content

Commit

Permalink
rsyslogd handler (#71)
Browse files Browse the repository at this point in the history
* restart rsyslogd if changes are done to the slurm rsyslog.conf
  • Loading branch information
martbhell authored Oct 27, 2016
1 parent b552ed1 commit 9f61da3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ pam_use_namespace: False
pam_tmp_inst_dir: /l/tmp-inst/
pam_var_tmp_inst_dir: /l/vartmp_inst/

# template in a file to manage slurm logs via rsyslog
slurm_manage_rsyslog_conf: True
# sysctl settings from slurm htc guide.
slurm_manage_sysctl: True
slurm_sysctl_core_somaxconn: 4096 # 128 is the default in el7
Expand Down
4 changes: 4 additions & 0 deletions handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@
- name: restart slurmdbd
service: name=slurmdbd state=restarted
when: slurm_accounting_storage_host == ansible_hostname

- name: Restart rsyslog
service: name=rsyslog state=restarted

2 changes: 2 additions & 0 deletions tasks/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@

- name: write all slurm logs handled by rsyslog to one file
template: src=slurm_rsyslog.conf dest=/etc/rsyslog.d/10_slurm_rsyslog.conf owner=root mode=0644 backup=yes
notify: Restart rsyslog
when: slurm_manage_rsyslog_conf

- name: configure logrotate to rotate slurm_logs in slurm_log_dir
template: src=slurm_logrotate.j2 dest=/etc/logrotate.d/slurm owner=root mode=0644 backup=no
Expand Down
1 change: 1 addition & 0 deletions tests/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@

pre_tasks:
- debug: var=group_names
- package: name=rsyslog state=present

0 comments on commit 9f61da3

Please sign in to comment.