summaryrefslogtreecommitdiff
path: root/roles/monitoring/landingpage/tasks/main.yml
blob: 3158770b927b61062b77bee42ed474a28e395f9b (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
---
- name: create nginx document root directory
  file:
    path: "/var/www/landingpage"
    state: directory

- name: copy index.html
  template:
    src: index.html.j2
    dest: "/var/www/landingpage/index.html"

- name: configure nginx vhost
  vars:
    nginx_vhost:
      name: landingpage
      template: generic
      hostnames: "{{ monitoring_landingpage_hostnames }}"
      acme: "{{ monitoring_landingpage_acme }}"
      locations:
        '/':
          root: /var/www/landingpage
        '/prometheus/':
          proxy_pass: "http://{{ prometheus_server_web_listen_address | default('127.0.0.1:9090')  }}"
        '/alertmanager/':
          proxy_pass: "http://{{ prometheus_alertmanager_web_listen_address | default('127.0.0.1:9093') }}"
        '/grafana/':
          proxy_pass: "http://{{ grafana_config_server.http_addr | default('localhost') }}:{{ grafana_config_server.http_port | default(3000) }}"
  include_role:
    name: nginx/vhost