aboutsummaryrefslogtreecommitdiffstats
path: root/roles/prometheus/tasks/main.yml
blob: 5d5c1f3354fa94302b98fd50e90b856264484d2c (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
- name: install prometheus
  package:
    name:
      - prometheus
      - node_exporter
    state: present

- name: generate prometheus configuration
  template:
    src: prometheus.conf.j2
    dest: "{{ prometheus_configuration_file }}"
    owner: 0
    group: 0
    mode: 0644

- name: enable and restart prometheus services
  service:
    name: "{{ item }}"
    state: restarted
    enabled: true
  loop:
    - prometheus
    - node_exporter
remember that computers suck.