diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/defaults/main.yml b/defaults/main.yml old mode 100644 new mode 100755 index 620dc09..8c9f67e --- a/defaults/main.yml +++ b/defaults/main.yml @@ -9,7 +9,7 @@ nginx_ppa_version: stable # The name of the nginx apt/yum package to install. nginx_package_name: "nginx" -nginx_worker_processes: "1" +nginx_worker_processes: "auto" nginx_worker_connections: "1024" nginx_multi_accept: "off" diff --git a/handlers/main.yml b/handlers/main.yml old mode 100644 new mode 100755 diff --git a/meta/main.yml b/meta/main.yml old mode 100644 new mode 100755 diff --git a/tasks/main.yml b/tasks/main.yml old mode 100644 new mode 100755 diff --git a/tasks/setup-Debian.yml b/tasks/setup-Debian.yml old mode 100644 new mode 100755 diff --git a/tasks/setup-FreeBSD.yml b/tasks/setup-FreeBSD.yml old mode 100644 new mode 100755 diff --git a/tasks/setup-RedHat.yml b/tasks/setup-RedHat.yml old mode 100644 new mode 100755 diff --git a/tasks/setup-Ubuntu.yml b/tasks/setup-Ubuntu.yml old mode 100644 new mode 100755 diff --git a/tasks/vhosts.yml b/tasks/vhosts.yml old mode 100644 new mode 100755 index 583ff77..560b455 --- a/tasks/vhosts.yml +++ b/tasks/vhosts.yml @@ -16,6 +16,12 @@ notify: - reload nginx +- name: Creates Nginx vhost directory + file: path=/var/www/html/{{ server_hostname }} state=directory owner={{ nginx_user }} group={{ nginx_user }} mode=0775 recurse=yes + when: nginx_vhosts|length > 0 + notify: + - reload nginx + - name: Remove managed vhost config file (if no vhosts are configured). file: path: "{{ nginx_vhost_path }}/vhosts.conf" diff --git a/templates/nginx.conf.j2 b/templates/nginx.conf.j2 old mode 100644 new mode 100755 index e9499e7..86eda73 --- a/templates/nginx.conf.j2 +++ b/templates/nginx.conf.j2 @@ -35,7 +35,7 @@ http { keepalive_timeout {{ nginx_keepalive_timeout }}; keepalive_requests {{ nginx_keepalive_requests }}; - #gzip on; + gzip on; {% if nginx_proxy_cache_path %} proxy_cache_path {{ nginx_proxy_cache_path }}; diff --git a/templates/nginx.repo.j2 b/templates/nginx.repo.j2 old mode 100644 new mode 100755 diff --git a/templates/vhosts.j2 b/templates/vhosts.j2 old mode 100644 new mode 100755 diff --git a/tests/inventory b/tests/inventory old mode 100644 new mode 100755 diff --git a/tests/test.yml b/tests/test.yml old mode 100644 new mode 100755 diff --git a/vars/Debian.yml b/vars/Debian.yml old mode 100644 new mode 100755 diff --git a/vars/FreeBSD.yml b/vars/FreeBSD.yml old mode 100644 new mode 100755 diff --git a/vars/RedHat.yml b/vars/RedHat.yml old mode 100644 new mode 100755