aboutsummaryrefslogblamecommitdiffstats
path: root/roles/prometheus/tasks/main.yml
blob: 956439abc8100aa133182d877313e794d40e4f45 (plain) (tree)
1
2
3
4
5
6
7
8
9
10

   
                          
                          





                                         
                           






                                               
                          





                      
---

- name: install prometheus
  ansible.builtin.package:
    name:
      - prometheus
      - node_exporter
    state: present

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

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