Moved var nginx_installation_directory to global vars

dehydrated
Felix Stupp 4 years ago
parent b1a93849a1
commit a9c8fd9af3
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -115,6 +115,7 @@ global_nfs_directory: "{{ global_webservers_directory }}/nfs"
global_nginx_system_user: www-data
global_nginx_service_name: "nginx.service"
global_nginx_installation_directory: "/etc/nginx"
global_pamd: "/etc/pam.d"

@ -1,10 +1,9 @@
---
nginx_installation_directory: "/etc/nginx"
nginx_upstreams_directory: "{{ nginx_installation_directory }}/upstreams"
nginx_sites_directory: "{{ nginx_installation_directory }}/sites"
nginx_streams_directory: "{{ nginx_installation_directory }}/streams"
nginx_snippets_directory: "{{ nginx_installation_directory }}/snippets"
nginx_upstreams_directory: "{{ global_nginx_installation_directory }}/upstreams"
nginx_sites_directory: "{{ global_nginx_installation_directory }}/sites"
nginx_streams_directory: "{{ global_nginx_installation_directory }}/streams"
nginx_snippets_directory: "{{ global_nginx_installation_directory }}/snippets"
nginx_global_log_directory: "{{ global_log_directory }}/nginx"
nginx_global_access_log: "{{ nginx_global_log_directory }}/access.log"

@ -9,7 +9,7 @@
- name: Remove unnecessary directories
file:
state: absent
name: "{{ nginx_installation_directory }}/{{ item }}"
name: "{{ global_nginx_installation_directory }}/{{ item }}"
with_items: "{{ nginx_unnecessary_files }}"
- name: Create directories for nginx
@ -71,7 +71,7 @@
- name: Configure nginx
template:
src: nginx.conf
dest: "{{ nginx_installation_directory }}/nginx.conf"
dest: "{{ global_nginx_installation_directory }}/nginx.conf"
validate: /usr/sbin/nginx -t -c %s
notify: reload nginx

@ -1,7 +1,7 @@
user {{ global_nginx_system_user }} {{ global_nginx_system_user }};
worker_processes auto;
pid /run/nginx.pid;
include {{ nginx_installation_directory }}/modules-enabled/*.conf;
include {{ global_nginx_installation_directory }}/modules-enabled/*.conf;
error_log {{ nginx_global_error_log }};
@ -26,7 +26,7 @@ http {
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include {{ nginx_installation_directory }}/mime.types;
include {{ global_nginx_installation_directory }}/mime.types;
default_type application/octet-stream;
##
@ -79,7 +79,7 @@ http {
# Virtual Host Configs
##
include {{ nginx_installation_directory }}/conf.d/*.conf;
include {{ global_nginx_installation_directory }}/conf.d/*.conf;
include {{ nginx_sites_directory }}/*;
include {{ nginx_upstreams_directory }}/*;

@ -19,7 +19,7 @@ server {
{{ status_page_acl | indent(width=4) }}
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_index index.php;
include {{ nginx_installation_directory }}/fastcgi_params;
include {{ global_nginx_installation_directory }}/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param HTTPS on;
@ -35,7 +35,7 @@ server {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
try_files $uri =404;
fastcgi_index index.php;
include {{ nginx_installation_directory }}/fastcgi_params;
include {{ global_nginx_installation_directory }}/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param HTTPS on;

@ -56,7 +56,7 @@ dependencies:
# fastcgi_split_path_info ^(.+?\.php)(/.*)$;
# try_files $uri =404;
# fastcgi_index index.php;
# include {{ nginx_installation_directory }}/fastcgi_params;
# include {{ global_nginx_installation_directory }}/fastcgi_params;
# fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
# fastcgi_param PATH_INFO $fastcgi_path_info;
# fastcgi_param HTTPS on;
@ -70,7 +70,7 @@ dependencies:
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
try_files $fastcgi_script_name =404;
fastcgi_index index.php;
include {{ nginx_installation_directory }}/fastcgi_params;
include {{ global_nginx_installation_directory }}/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param HTTPS on;
@ -93,7 +93,7 @@ dependencies:
{{ status_page_acl | indent(width=2) }}
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_index index.php;
include {{ nginx_installation_directory }}/fastcgi_params;
include {{ global_nginx_installation_directory }}/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param HTTPS on;

Loading…
Cancel
Save