prometheus/server/tasks/main.yaml
author Luke Hoersten <luke@hoersten.org>
Tue, 09 Jun 2020 10:15:03 -0500
changeset 37 2ef98b7b40d4
parent 8 20975062661d
child 52 5a5071d4eaad
permissions -rw-r--r--
Updated to buster-backports matrix.

---

- name: add grafana apt key
  become: yes
  apt_key: url="https://packages.grafana.com/gpg.key"

- name: add grafana apt repo
  become: yes
  apt_repository: repo="deb https://packages.grafana.com/oss/deb stable main"

- name: install prometheus and grafana
  become: yes
  apt: name="{{prometheus_server_apt_packages}}" state="latest"

- name: configure prometheus
  become: yes
  template:
    src: "{{prometheus_server_conf}}"
    dest: "/etc/prometheus/prometheus.yml"
  notify:
    - restart prometheus service
    - restart grafana service

# /etc/grafana/grafana.ini