summaryrefslogtreecommitdiff
path: root/dan/ele-calypso.yml
blob: 818e8f3a8ace4f09f50a458236d5c380d0ec8ebc (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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
---
- name: Basic Setup
  hosts: ele-calypso
  roles:
  - role: apt-repo/base
  - role: core/base
  - role: core/sshd/base
  - role: core/zsh
  - role: core/ntp
  - role: core/cpu-microcode

- name: Payload Setup
  hosts: ele-calypso
  roles:
  - role: apt-repo/spreadspace
  - role: streaming/blackmagic/desktopvideo
  - role: kubernetes/base
  - role: kubernetes/standalone/base
  - role: streaming/player
  - role: nginx/base
  - role: monitoring/sachet
  - role: monitoring/prometheus/ca
  - role: monitoring/prometheus/exporter
  - role: monitoring/prometheus/server
  - role: monitoring/prometheus/alertmanager
  - role: monitoring/grafana
  - role: nginx/vhost
    nginx_vhost:
      name: monitoring
      template: generic
      hostnames:
      - "_"
      locations:
        '/grafana/':
          proxy_pass: "http://127.0.0.1:3000"
        '/prometheus/':
          proxy_pass: "http://127.0.0.1:9090"
        '/alertmanager/':
          proxy_pass: "http://127.0.0.1:9093"
  post_tasks:
  ## TODO: move to network/interfaces when this is done
  - name: install vlan interfaces
    loop: "{{ network.vlans | dict2items }}"
    loop_control:
      label: "{{ item.key }} ({{ item.value | join(',') }})"
    copy:
      dest: "/etc/network/interfaces.d/{{ item.key }}"
      content: |
        auto {{ item.key }}
        iface {{ item.key }} inet manual
        {% for vlan in item.value %}
        {%   set vlan_ifname = item.key + '.' + (vlan | string) %}
        {%   set vlan_iface = (network.interfaces | selectattr('name', 'eq', vlan_ifname)) %}

        auto {{ vlan_ifname }}
        {%   if vlan_iface %}
        iface {{ vlan_ifname }} inet static
          address {{ (vlan_iface | first).address }}
        {%   else %}
        iface {{ vlan_ifname }} inet manual
        {%   endif %}
        {% endfor %}