Skip to content

Commit 7341b2e

Browse files
authored
Flush handlers before running nginx -T and setting up logrotate (#279)
1 parent a0a4917 commit 7341b2e

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

tasks/conf/logrotate.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@
3333
dest: "/etc/logrotate.d/nginx"
3434
register: nginx_logrotate_result
3535

36-
- name: "(Config: All OSs) Ensure NGINX is Running"
37-
meta: flush_handlers
38-
3936
- name: "(Config: All OSs) Run Logrotate"
4037
command: logrotate -f /etc/logrotate.d/nginx
4138
changed_when: nginx_logrotate_result.changed

tasks/main.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,23 @@
5353
when: true in nginx_modules.values()
5454
tags: nginx_install_modules
5555

56-
- include_tasks: "{{ role_path }}/tasks/conf/debug-output.yml"
57-
when: nginx_debug_output | bool
58-
tags: nginx_debug_output
59-
6056
- include_tasks: "{{ role_path }}/tasks/plus/delete-license.yml"
6157
when:
6258
- nginx_type == "plus"
6359
- nginx_delete_license
6460
tags: nginx_delete_license
6561

62+
- name: "(Config: All OSs) Ensure NGINX is Running"
63+
meta: flush_handlers
64+
65+
- include_tasks: "{{ role_path }}/tasks/conf/debug-output.yml"
66+
when: nginx_debug_output | bool
67+
tags: nginx_debug_output
68+
69+
- include_tasks: "{{ role_path }}/tasks/conf/logrotate.yml"
70+
when: nginx_logrotate_conf_enable | bool
71+
tags: nginx_logrotate_config
72+
6673
when: nginx_enable | bool
6774

6875
- include_tasks: "{{ role_path }}/tasks/amplify/install-amplify.yml"
@@ -75,7 +82,3 @@
7582
- include_tasks: "{{ role_path }}/tasks/unit/install-unit.yml"
7683
when: nginx_unit_enable | bool
7784
tags: nginx_install_unit
78-
79-
- include_tasks: "{{ role_path }}/tasks/conf/logrotate.yml"
80-
when: nginx_logrotate_conf_enable | bool
81-
tags: nginx_logrotate_config

0 commit comments

Comments
 (0)