aboutsummaryrefslogtreecommitdiffstats
path: root/roles/nginx/tasks/main.yml
blob: 8b32f073177d90c8b53866a1ec16c351ce18144a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
---
- name: Install nginx
  apt: name=nginx state=present

- name: Copy nginx configuration for wordpress
  template: src=default.conf dest=/etc/nginx/conf.d/default.conf
  notify: restart nginx

mkdir -p /srv/http/default

- name: Setup default nginx pages
  copy:
    src: "{{item.src}}"
    dest: "/srv/http/default/www/{{item.dest}}"
    owner: www-data
    group: www-data
    force: no
  tags:
    - nginx
  with_items:
    - {src: "static_files/nginx_default_404.html", dest: "404.html"}
    - {src: "static_files/nginx_default_50x.html", dest: "50x.html"}
    - {src: "static_files/nginx_default_favicon.png", dest: "favicon.png"}
    - {src: "static_files/nginx_default_index.html", dest: "index.html"}