Run logrotate only logrotate config changes (#302)
This commit is contained in:
parent
e2da68f875
commit
ab24604454
@ -40,3 +40,6 @@
|
||||
name: unitd
|
||||
state: started
|
||||
enabled: yes
|
||||
|
||||
- name: "(Config: All OSs) Run Logrotate"
|
||||
command: logrotate -f /etc/logrotate.d/nginx
|
||||
|
@ -31,8 +31,4 @@
|
||||
template:
|
||||
src: "logrotate/nginx.j2"
|
||||
dest: "/etc/logrotate.d/nginx"
|
||||
register: nginx_logrotate_result
|
||||
|
||||
- name: "(Config: All OSs) Run Logrotate"
|
||||
command: logrotate -f /etc/logrotate.d/nginx
|
||||
changed_when: nginx_logrotate_result.changed
|
||||
notify: "(Config: All OSs) Run Logrotate"
|
||||
|
Loading…
Reference in New Issue
Block a user