Skip to content

Commit 5a04ee3

Browse files
authored
Updating-drupal-common-j2 (#2319)
1 parent 149af43 commit 5a04ee3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

roles/debian/nginx/tasks/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@
6666
state: directory
6767
mode: "0755"
6868

69+
- name: Set nginx location behavior, fallback to default if no custom behavior is provided
70+
set_fact:
71+
nginx_location_behavior: "{{ nginx.custom_nginx_location_behavior | default(['try_files @rewrite /index.php?$query_string;']) }}"
72+
6973
- name: Copy project type-specific configuration in place.
7074
ansible.builtin.template:
7175
src: "{{ item }}.j2"
@@ -150,10 +154,6 @@
150154
- nginx.overrides is defined
151155
- nginx.overrides | length > 0
152156

153-
- name: Set nginx location behavior, fallback to default if no custom behavior is provided
154-
set_fact:
155-
nginx_location_behavior: "{{ nginx.custom_nginx_location_behavior | default(['try_files @rewrite /index.php?$query_string;']) }}"
156-
157157
- name: Test NGINX configuration.
158158
ansible.builtin.command: nginx -t
159159
register: _nginx_test_result

roles/debian/nginx/templates/drupal_common.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ location / {
2222
# @todo
2323
# limit_req zone=bots burst=5 nodelay;
2424
{% endif %}
25-
{{ nginx.nginx_location_behavior | join("\n ") }}
25+
{{ nginx_location_behavior | join("\n ") }}
2626
}
2727

2828
############ Blacklist block.

0 commit comments

Comments
 (0)