diff --git a/roles/slurm-common/tasks/installSlurmFromSource.yml b/roles/slurm-common/tasks/installSlurmFromSource.yml
index 3a3d2f2a3633cdea76a69fa62b16b0731cf104a7..641e03ef7a5195d3388a067da3ea3ba0593765b3 100644
--- a/roles/slurm-common/tasks/installSlurmFromSource.yml
+++ b/roles/slurm-common/tasks/installSlurmFromSource.yml
@@ -37,3 +37,9 @@
   template: src=slurmlog.j2 dest=/etc/logrotate.d/slurm mode=644
   sudo: true
 
+- name: add slurm db log rotate config
+  template: src=slurmdblog.j2 dest=/etc/logrotate.d/slurmdb mode=644
+  sudo: true
+  delegate_to: "{{ slurmctrl }}"
+
+
diff --git a/roles/slurm-common/templates/slurmdblog.j2 b/roles/slurm-common/templates/slurmdblog.j2
new file mode 100644
index 0000000000000000000000000000000000000000..f9042d6b392781293a35c0c4d70f09f63813e809
--- /dev/null
+++ b/roles/slurm-common/templates/slurmdblog.j2
@@ -0,0 +1,24 @@
+{{ slurmdbdlog.log }}
+{% endif %}
+{
+ compress
+ missingok 
+ nocopytruncate 
+ nocreate 
+ nodelaycompress 
+ nomail  
+ notifempty 
+ noolddir 
+ rotate 5 
+ sharedscripts 
+ size=5M 
+ create 640 slurm root 
+{% if ansible_os_family == 'RedHat' and ansible_distribution_version >= '7' %}
+  postrotate
+    {{ slurm_dir }}/sbin/slurmdbd flushlogs  1>/dev/null || true
+{% else %}
+ postrotate /etc/init.d/slurmdbd reconfig 
+{% endif %}
+ endscript
+}
+
diff --git a/roles/slurm-common/templates/slurmlog.j2 b/roles/slurm-common/templates/slurmlog.j2
index 54731e01308d7ee15d470736242630112354e8e9..b78e6db421ec79943cbc0378fb27434bf2843651 100644
--- a/roles/slurm-common/templates/slurmlog.j2
+++ b/roles/slurm-common/templates/slurmlog.j2
@@ -1,4 +1,9 @@
-{{ slurmddebug.log }}/slurm*.log
+{% if slurmctrl == inventory_hostname %}
+{{ slurmctlddebug.log }}
+{{ slurmschedlog.log }}
+{% else *}
+{{ slurmddebug.log }}
+{% endif %}
 {
  compress
  missingok 
@@ -12,18 +17,12 @@
  sharedscripts 
  size=5M 
  create 640 slurm root 
-{% if slurmctrl == inventory_hostname %}
-{% if ansible_os_family == 'RedHat' and ansible_distribution_version >= '7' %}
-  systemctl restart slurmdbd
-{% else %}
- postrotate /etc/init.d/slurmdbd reconfig 
-{% endif %}
-{% endif %}
 {% if ansible_os_family == 'RedHat' and ansible_distribution_version >= '7' %}
+ postrotate
 {% if slurmctrl == inventory_hostname %}
-  systemctl restart slurmctld 
+   {{ slurm_dir }}/sbin/slurmctld flushlogs 1>/dev/null || true
 {% else %}
-  systemctl restart slurmd 
+   {{ slurm_dir }}/sbin/slurmd flushlogs 1>/dev/null || true
 {% endif %}
 {% else %}
  postrotate /etc/init.d/slurm reconfig