Update nginx role
- Switch "worker_processes" to "auto" - Disable "server_tokens" globally - Change formatting for readability
This commit is contained in:
parent
9ff6b69b82
commit
eed7317b0c
4 changed files with 41 additions and 39 deletions
|
@ -1,36 +1,34 @@
|
|||
---
|
||||
- name: be sure nginx is installed
|
||||
apt: name=nginx state=latest
|
||||
- name: install nginx
|
||||
apt:
|
||||
name: nginx
|
||||
state: present
|
||||
tags: nginx
|
||||
|
||||
- name: disable default site
|
||||
file:
|
||||
path: /etc/nginx/sites-enabled/default
|
||||
state: absent
|
||||
notify: restart nginx
|
||||
tags: nginx
|
||||
|
||||
- name: copy includes
|
||||
copy: >
|
||||
src=etc/nginx/include
|
||||
dest=/etc/nginx
|
||||
mode=0644
|
||||
owner=root
|
||||
group=root
|
||||
notify:
|
||||
- restart nginx
|
||||
copy:
|
||||
src: etc/nginx/include
|
||||
dest: /etc/nginx
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: root
|
||||
notify: restart nginx
|
||||
tags: nginx
|
||||
|
||||
- name: remove default site
|
||||
file: path={{ item }} state=absent
|
||||
with_items:
|
||||
- /etc/nginx/sites-available/default
|
||||
- /etc/nginx/sites-enabled/default
|
||||
- /var/www/html
|
||||
notify:
|
||||
- restart nginx
|
||||
tags: nginx
|
||||
|
||||
- name: configure nginx
|
||||
copy: >
|
||||
src=etc/nginx/nginx.conf
|
||||
dest=/etc/nginx/nginx.conf
|
||||
mode=0644
|
||||
owner=root
|
||||
group=root
|
||||
notify:
|
||||
- restart nginx
|
||||
- name: copy nginx.conf
|
||||
copy:
|
||||
src: etc/nginx/nginx.conf
|
||||
dest: /etc/nginx
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: root
|
||||
backup: yes
|
||||
notify: restart nginx
|
||||
tags: nginx
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue