From c634d967a9f4f7cf8246380c8a423ef8f431ecd0 Mon Sep 17 00:00:00 2001
From: June <june@jsts.xyz>
Date: Tue, 18 Feb 2025 03:37:20 +0100
Subject: [PATCH] nginx(role): add "logging" to the reserved configuration
 names

---
 roles/nginx/README.md                                           | 2 +-
 .../tasks/make_sure_nginx_configuration_names_are_valid.yaml    | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/roles/nginx/README.md b/roles/nginx/README.md
index 88467c3..c399c50 100644
--- a/roles/nginx/README.md
+++ b/roles/nginx/README.md
@@ -34,7 +34,7 @@ None.
   Defaults to `true`.
 - `nginx__configurations`: List of nginx configurations to ensure are deployed.
 - `nginx__configurations.*.name`: This name with `.conf` appended will be used for the configurations file name under `/etc/nginx/conf.d/`.  
-  `tls` and `redirect` are reserved names.
+  `tls`, `redirect` and `logging` are reserved names.
 - `nginx__configurations.*.content`: This configurations content.  
 - `nginx__use_custom_nginx_conf`: Whether or not to use a custom `/etc/nginx/nginx.conf`.
   If set to true, you must provide the content for a custom `nginx.conf` via `nginx__custom_nginx_conf`.  
diff --git a/roles/nginx/tasks/make_sure_nginx_configuration_names_are_valid.yaml b/roles/nginx/tasks/make_sure_nginx_configuration_names_are_valid.yaml
index 54ea6f5..234b12c 100644
--- a/roles/nginx/tasks/make_sure_nginx_configuration_names_are_valid.yaml
+++ b/roles/nginx/tasks/make_sure_nginx_configuration_names_are_valid.yaml
@@ -3,4 +3,5 @@
     msg: "You used the following name: `{{ item.name }}`. Please make sure to not use the following names: `tls`, `redirect`."
   when: item.name == "tls"
         or item.name == "redirect"
+        or item.name == "logging"
   loop: "{{ nginx__configurations }}"