pull/63/merge
ivrh 8 years ago committed by GitHub
commit 16c51afb7f
  1. 0
      README.md
  2. 2
      defaults/main.yml
  3. 0
      handlers/main.yml
  4. 0
      meta/main.yml
  5. 10
      tasks/main.yml
  6. 0
      tasks/setup-Debian.yml
  7. 0
      tasks/setup-FreeBSD.yml
  8. 0
      tasks/setup-RedHat.yml
  9. 0
      tasks/setup-Ubuntu.yml
  10. 10
      tasks/vhosts.yml
  11. 7
      templates/headers.conf.j2
  12. 2
      templates/nginx.conf.j2
  13. 0
      templates/nginx.repo.j2
  14. 0
      templates/vhosts.j2
  15. 0
      tests/inventory
  16. 0
      tests/test.yml
  17. 0
      vars/Debian.yml
  18. 0
      vars/FreeBSD.yml
  19. 0
      vars/RedHat.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"

@ -35,5 +35,15 @@
notify:
- reload nginx
- name: Copy headers config file in place.
template:
src: headers.conf.j2
dest: "{{ nginx_conf_path }}"
owner: root
group: "{{ root_group }}"
mode: 0644
notify:
- reload nginx
- name: Ensure nginx is started and enabled to start at boot.
service: name=nginx state=started enabled=yes

@ -1,4 +1,8 @@
---
- name: Creates Nginx conf directories
file: path={{ nginx_vhost_path }} state=directory mode=0755 recurse=yes
when: nginx_vhosts|length > 0
- name: Remove default nginx vhost config file (if configured).
file:
path: "{{ nginx_default_vhost_path }}"
@ -16,6 +20,12 @@
notify:
- reload nginx
- name: Creates Nginx vhost directory
file: path=/var/www/html/{{ server_hostname }} state=directory owner={{ php_fpm_pool_user }} group={{ php_fpm_pool_group }} mode=0755 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 }}/{{ nginx_vhosts_filename }}"

@ -0,0 +1,7 @@
{% if nginx_bigpipe_enable %}
add_header X-Accel-Buffering: no;
{% endif %}
add_header X-Frame-Options SAMEORIGIN;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://ssl.google-analytics.com https://assets.zendesk.com https://connect.facebook.net; img-src 'self' https://ssl.google-analytics.com https://s-static.ak.facebook.com https://assets.zendesk.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://assets.zendesk.com; font-src 'self' https://themes.googleusercontent.com; frame-src https://assets.zendesk.com https://www.facebook.com https://s-static.ak.facebook.com https://tautt.zendesk.com; object-src 'none'";

@ -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 }};