mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-09-07 18:57:12 +02:00
Renamed general and mode constants and implemented a check to verify that constants are just defined ones over the whole repository
This commit is contained in:
@@ -14,11 +14,11 @@ This Ansible role installs and configures **Nginx** as a core HTTP/stream server
|
||||
* **Configurable reset and cleanup** modes to purge and recreate directories.
|
||||
* **Custom `nginx.conf`** template with sensible defaults for performance and security.
|
||||
* **Stream proxy support**: includes `stream` block for TCP/UDP proxies.
|
||||
* **Cache directory management**: cleanup and recreation based on `mode_cleanup`.
|
||||
* **Cache directory management**: cleanup and recreation based on `MODE_CLEANUP`.
|
||||
|
||||
|
||||
## Debugging Tips
|
||||
|
||||
* **General logs**: `journalctl -f -u nginx`
|
||||
* **Filter by host**: `journalctl -u nginx -f | grep "{{ inventory_hostname }}"`
|
||||
* **Enable detailed format**: set `enable_debug: true` and reload Nginx.
|
||||
* **Enable detailed format**: set `MODE_DEBUG: true` and reload Nginx.
|
||||
|
@@ -20,7 +20,7 @@
|
||||
|
||||
- name: "reset (if enabled)"
|
||||
include_tasks: 02_reset.yml
|
||||
when: mode_reset | bool
|
||||
when: MODE_RESET | bool
|
||||
|
||||
- name: Ensure nginx configuration directories are present
|
||||
file:
|
||||
|
@@ -1,4 +1,4 @@
|
||||
- name: "Delete {{nginx.directories.configuration}} directory, when mode_reset"
|
||||
- name: "Delete {{nginx.directories.configuration}} directory, when MODE_RESET"
|
||||
file:
|
||||
path: "{{ nginx.directories.configuration }}"
|
||||
state: absent
|
@@ -4,7 +4,7 @@
|
||||
path: "{{ item.value }}"
|
||||
state: absent
|
||||
when:
|
||||
- mode_cleanup | bool
|
||||
- MODE_CLEANUP | bool
|
||||
- run_once_nginx_reverse_proxy is not defined
|
||||
loop: "{{ nginx.directories.cache | dict2items }}"
|
||||
loop_control:
|
||||
|
@@ -24,7 +24,7 @@ http
|
||||
# --------------------------------------------------------------------------------
|
||||
|
||||
{# logging and debugging #}
|
||||
{% if enable_debug | bool %}
|
||||
{% if MODE_DEBUG | bool %}
|
||||
{# individual log format for better debugging #}
|
||||
log_format debug '$host - $remote_addr [$time_local] '
|
||||
'"$request" $status $body_bytes_sent '
|
||||
|
Reference in New Issue
Block a user