summaryrefslogtreecommitdiff
path: root/spreadspace/glt-stream.yml
blob: 355c989fcc87f938290a7a0ede921de5d67b1eaf (plain) (blame)
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
---
- name: Basic Setup
  hosts: glt-stream
  roles:
  - role: apt-repo/base
  - role: core/base
  - role: core/sshd
  - role: core/zsh
  - role: core/ntp
  - role: apt-repo/spreadspace
  - role: acmetool/base
  - role: nginx/base
  - name: storage/lvm/volume
    lvm_volume:
      vg: "{{ host_name }}"
      lv: www
      size: 10G
      fs: ext4
      dest: /srv/www
  post_tasks:
  - name: create base directory for static www content
    file:
      path: /srv/www/stream
      state: directory

  - name: configure default vhost stream.linuxtage.at
    vars:
      nginx_vhost:
        default: yes
        name: stream
        template: static-files-with-acme
        acme: yes
        hostnames:
        - stream.linuxtage.at
        extra_directives: |-
          add_header Access-Control-Allow-Headers "origin,range,accept-encoding,referer";
          add_header Access-Control-Allow-Methods "GET,HEAD,OPTIONS";
          add_header Access-Control-Allow-Origin "*";
          add_header Access-Control-Expose-Headers "Server,range,Content-Length,Content-Range,Date";
        locations:
          '/':
            root: /srv/www/stream
            index: index.html
          '/preped':
            root: /srv/www/stream
            autoindex: {}
    include_role:
      name: nginx/vhost