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