summaryrefslogtreecommitdiffstats
path: root/tasks/httpd.yml
blob: 22757d5e25cfcec52513f7cc994cb9a9c3874bbb (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
---
- name: Install nginx
  apt: pkg=nginx-light

- name: Start nginx
  service: name=nginx enabled=true state=started

- meta: flush_handlers

- name: Create directory /etc/nginx/ssl
  file: path=/etc/nginx/ssl
        state=directory
        owner=root group=root
        mode=0755

- name: Install lacme
  apt: pkg=lacme

- name: Copy /etc/lacme/lacme-certs.conf.d/webmap.conf
  copy: src=etc/lacme/lacme-certs.conf.d/webmap.conf
        dest=/etc/lacme/lacme-certs.conf.d/webmap.conf
        owner=root group=root
        mode=0644

- name: Copy /etc/nginx/snippets/ssl.conf
  copy: src=etc/nginx/snippets/ssl.conf
        dest=/etc/nginx/snippets/ssl.conf
        owner=root group=root
        mode=0644
  notify: Reload nginx

- name: Copy /etc/nginx/sites-available/webmap
  copy: src=etc/nginx/sites-available/webmap
        dest=/etc/nginx/sites-available/webmap
        owner=root group=root
        mode=0644
  notify: Reload nginx

- name: Create /etc/nginx/sites-enabled/webmap
  file: src=../sites-available/webmap
        dest=/etc/nginx/sites-enabled/webmap
        owner=root group=root
        state=link force=yes
  notify: Reload nginx

- name: Create directory /var/www/webmap
  file: path=/var/www/webmap
        state=directory
        owner=root group=root
        mode=0755

- name: Create /var/www/webmap/_.txt
  copy: dest=/var/www/webmap/_.txt content=""
        owner=root group=root
        mode=0644

- meta: flush_handlers