prometheus/server/tasks/main.yaml
author Luke Hoersten <luke@hoersten.org>
Mon, 10 Feb 2020 07:49:58 -0600
changeset 7 dc3fca0131a7
parent 5 4f014cdac0b1
child 8 20975062661d
permissions -rw-r--r--
Updated some permissions on conf files
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
fd351734f007 Prometheus and WriteFreely roles are work in progress.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     1
---
fd351734f007 Prometheus and WriteFreely roles are work in progress.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     2
fd351734f007 Prometheus and WriteFreely roles are work in progress.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     3
- name: add grafana apt key
fd351734f007 Prometheus and WriteFreely roles are work in progress.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     4
  become: yes
fd351734f007 Prometheus and WriteFreely roles are work in progress.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     5
  apt_key: url="https://packages.grafana.com/gpg.key"
fd351734f007 Prometheus and WriteFreely roles are work in progress.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     6
fd351734f007 Prometheus and WriteFreely roles are work in progress.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     7
- name: add grafana apt repo
fd351734f007 Prometheus and WriteFreely roles are work in progress.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     8
  become: yes
fd351734f007 Prometheus and WriteFreely roles are work in progress.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     9
  apt_repository: repo="deb https://packages.grafana.com/oss/deb stable main"
fd351734f007 Prometheus and WriteFreely roles are work in progress.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    10
fd351734f007 Prometheus and WriteFreely roles are work in progress.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    11
- name: install prometheus and grafana
fd351734f007 Prometheus and WriteFreely roles are work in progress.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    12
  become: yes
5
4f014cdac0b1 Completed prometheus basic roles.
Luke Hoersten <luke@hoersten.org>
parents: 2
diff changeset
    13
  apt: name="{{prometheus_server_apt_packages}}" state="latest"
1
fd351734f007 Prometheus and WriteFreely roles are work in progress.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    14
5
4f014cdac0b1 Completed prometheus basic roles.
Luke Hoersten <luke@hoersten.org>
parents: 2
diff changeset
    15
- name: configure prometheus
4f014cdac0b1 Completed prometheus basic roles.
Luke Hoersten <luke@hoersten.org>
parents: 2
diff changeset
    16
  become: yes
4f014cdac0b1 Completed prometheus basic roles.
Luke Hoersten <luke@hoersten.org>
parents: 2
diff changeset
    17
  template:
4f014cdac0b1 Completed prometheus basic roles.
Luke Hoersten <luke@hoersten.org>
parents: 2
diff changeset
    18
    src: "{{prometheus_server_conf}}"
4f014cdac0b1 Completed prometheus basic roles.
Luke Hoersten <luke@hoersten.org>
parents: 2
diff changeset
    19
    dest: "/etc/prometheus/prometheus.yml"
4f014cdac0b1 Completed prometheus basic roles.
Luke Hoersten <luke@hoersten.org>
parents: 2
diff changeset
    20
  notify: restart prometheus service
4f014cdac0b1 Completed prometheus basic roles.
Luke Hoersten <luke@hoersten.org>
parents: 2
diff changeset
    21
1
fd351734f007 Prometheus and WriteFreely roles are work in progress.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    22
# /etc/grafana/grafana.ini