nginx und ffnord.net-Webseite
This commit is contained in:
parent
3df8b2a1ea
commit
30e39eca31
11 changed files with 184 additions and 0 deletions
roles/nginx/tasks
36
roles/nginx/tasks/main.yml
Normal file
36
roles/nginx/tasks/main.yml
Normal file
|
@ -0,0 +1,36 @@
|
|||
---
|
||||
- name: be sure nginx is installed
|
||||
apt: name=nginx state=latest
|
||||
tags: nginx
|
||||
|
||||
- name: copy includes
|
||||
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
|
||||
tags: nginx
|
Loading…
Add table
Add a link
Reference in a new issue