prometheus/server/tasks/main.yaml
author Luke Hoersten <luke@hoersten.org>
Sun, 09 Feb 2020 20:34:46 -0600
changeset 5 4f014cdac0b1
parent 2 2556522a2a45
child 8 20975062661d
permissions -rw-r--r--
Completed prometheus basic roles.

---

- 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

# /etc/grafana/grafana.ini