From a1295199445b7f4a490e1d8e73942ca053a0fd6c Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Wed, 17 Feb 2016 14:48:28 -0500 Subject: [PATCH] Do not include nginx.conf by default Mostly because has different settings. We'll still expose the setting to the user, but they have to default the file settings now. Change-Id: I2c26e2e1dabe361b44c1c1a80d264e90c3860a51 Signed-off-by: Paul Belanger --- defaults/main.yaml | 2 +- files/etc/nginx/nginx.conf | 30 ------------------------------ tasks/config.yaml | 1 + 3 files changed, 2 insertions(+), 31 deletions(-) delete mode 100644 files/etc/nginx/nginx.conf diff --git a/defaults/main.yaml b/defaults/main.yaml index b2ba697..3949daf 100644 --- a/defaults/main.yaml +++ b/defaults/main.yaml @@ -19,4 +19,4 @@ nginx_file_include_dir_owner: "{{ ansible_user }}" nginx_file_include_dir_src: "" nginx_file_nginx_conf_dest: /etc/nginx/nginx.conf -nginx_file_nginx_conf_src: etc/nginx/nginx.conf +nginx_file_nginx_conf_src: "" diff --git a/files/etc/nginx/nginx.conf b/files/etc/nginx/nginx.conf deleted file mode 100644 index 6a94b90..0000000 --- a/files/etc/nginx/nginx.conf +++ /dev/null @@ -1,30 +0,0 @@ -user nginx; -worker_processes auto; -error_log /var/log/nginx/error.log; -pid /run/nginx.pid; - -events { - worker_connections 1024; -} - -http { - log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - '$status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for"'; - - access_log /var/log/nginx/access.log main; - - sendfile on; - tcp_nopush on; - tcp_nodelay on; - keepalive_timeout 65; - types_hash_max_size 2048; - - include /etc/nginx/mime.types; - default_type application/octet-stream; - - # Load modular configuration files from the /etc/nginx/conf.d directory. - # See http://nginx.org/en/docs/ngx_core_module.html#include - # for more information. - include /etc/nginx/conf.d/*.conf; -} diff --git a/tasks/config.yaml b/tasks/config.yaml index 47f97ef..aa7b70e 100644 --- a/tasks/config.yaml +++ b/tasks/config.yaml @@ -16,6 +16,7 @@ copy: dest: "{{ nginx_file_nginx_conf_dest }}" src: "{{ nginx_file_nginx_conf_src }}" + when: nginx_file_nginx_conf_src != "" notify: - Validate nginx - Restart nginx