summaryrefslogtreecommitdiff
path: root/vendor/ruflin/elastica/ansible/roles/nginx/tasks/main.yml
blob: 6b2605317a2d74861da1cfc7435b93ce1ac17977 (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
25
26
---

- name: install nginx
  apt: >
    force=yes
    name=nginx
    state=present
    update_cache=no

- name: create mime.types
  template: >
    dest=/etc/nginx/mime.types
    src=mime.types.j2
  notify: restart nginx

- name: create nginx.conf
  template: >
    dest=/etc/nginx/nginx.conf
    src=nginx.conf.j2
  notify: restart nginx

- name: start nginx
  service: >
    enabled=yes
    name=nginx
    state=started