EOX GitLab Instance

all.yml 939 Bytes
Newer Older
Karl Grube's avatar
Karl Grube committed
1
2
---

Karl Grube's avatar
Karl Grube committed
3
- name: required packages installed
Karl Grube's avatar
Karl Grube committed
4
  package:
Karl Grube's avatar
Karl Grube committed
5
6
7
8
9
10
11
12
13
14
15
16
    name:
      - nginx 
      - grafana

- name: grafana configuration
  template:
    mode: 0640
    owner: root
    group: grafana
    dest: /etc/grafana/grafana.ini
    src: grafana.ini.j2
  notify: restart grafana
Karl Grube's avatar
Karl Grube committed
17
18
19

- name: grafana started and enabled
  service:
Karl Grube's avatar
Karl Grube committed
20
    name: grafana-server
Karl Grube's avatar
Karl Grube committed
21
22
    state: started
    enabled: yes
23
24
25
26
27

- name: grafana nginx site
  template:
    src: grafana_site.j2
    dest: /etc/nginx/sites-available/grafana
Karl Grube's avatar
Karl Grube committed
28
  notify: reload nginx
Karl Grube's avatar
Karl Grube committed
29
  tags: nginx
30
31
32
33
34
- name: nginx site link
  file:
    state: link
    src: ../sites-available/grafana
    dest: /etc/nginx/sites-enabled/grafana
Karl Grube's avatar
Karl Grube committed
35
  notify: reload nginx
Karl Grube's avatar
Karl Grube committed
36
37
38
39
40
41
42

- name: prometheus template
  template:
    src: prometheus_datasource.yaml.j2
    dest: /etc/grafana/provisioning/datasources/prometheus.yaml
    group: grafana
    mode: 0640
Karl Grube's avatar
Karl Grube committed
43
  notify: restart grafana
Karl Grube's avatar
Karl Grube committed
44
45
  when: prometheus_server is defined
  tags: provisioning