summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Belanger <pabelanger@redhat.com>2016-02-17 14:48:28 -0500
committerPaul Belanger <pabelanger@redhat.com>2016-02-17 14:48:28 -0500
commita1295199445b7f4a490e1d8e73942ca053a0fd6c (patch)
tree603a8d7f875ce065497043207ebb6510b3d8fd2f
parenteaa11bff680ebf92ae1dc7239c69b8ae8436cc06 (diff)
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 <pabelanger@redhat.com>
Notes
Notes (review): Code-Review+2: Paul Belanger <pabelanger@redhat.com> Workflow+1: Paul Belanger <pabelanger@redhat.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Thu, 18 Feb 2016 14:05:44 +0000 Reviewed-on: https://review.openstack.org/281491 Project: openstack/ansible-role-nginx Branch: refs/heads/master
-rw-r--r--defaults/main.yaml2
-rw-r--r--files/etc/nginx/nginx.conf30
-rw-r--r--tasks/config.yaml1
3 files changed, 2 insertions, 31 deletions
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 }}"
19nginx_file_include_dir_src: "" 19nginx_file_include_dir_src: ""
20 20
21nginx_file_nginx_conf_dest: /etc/nginx/nginx.conf 21nginx_file_nginx_conf_dest: /etc/nginx/nginx.conf
22nginx_file_nginx_conf_src: etc/nginx/nginx.conf 22nginx_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 @@
1user nginx;
2worker_processes auto;
3error_log /var/log/nginx/error.log;
4pid /run/nginx.pid;
5
6events {
7 worker_connections 1024;
8}
9
10http {
11 log_format main '$remote_addr - $remote_user [$time_local] "$request" '
12 '$status $body_bytes_sent "$http_referer" '
13 '"$http_user_agent" "$http_x_forwarded_for"';
14
15 access_log /var/log/nginx/access.log main;
16
17 sendfile on;
18 tcp_nopush on;
19 tcp_nodelay on;
20 keepalive_timeout 65;
21 types_hash_max_size 2048;
22
23 include /etc/nginx/mime.types;
24 default_type application/octet-stream;
25
26 # Load modular configuration files from the /etc/nginx/conf.d directory.
27 # See http://nginx.org/en/docs/ngx_core_module.html#include
28 # for more information.
29 include /etc/nginx/conf.d/*.conf;
30}
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 @@
16 copy: 16 copy:
17 dest: "{{ nginx_file_nginx_conf_dest }}" 17 dest: "{{ nginx_file_nginx_conf_dest }}"
18 src: "{{ nginx_file_nginx_conf_src }}" 18 src: "{{ nginx_file_nginx_conf_src }}"
19 when: nginx_file_nginx_conf_src != ""
19 notify: 20 notify:
20 - Validate nginx 21 - Validate nginx
21 - Restart nginx 22 - Restart nginx