main.yml 694 Bytes
Newer Older
1
2
---

3
4
- name: install prometheus server
  pacman: name=prometheus state=present
5
6
7
8
9

- name: install prometheus configuration
  template: src=prometheus.yml.j2 dest=/etc/prometheus/prometheus.yml owner=root group=root mode=644
  notify: reload prometheus

10
11
12
13
- name: install prometheus cli configuration
  copy: src=prometheus.conf dest=/etc/conf.d/prometheus owner=root group=root mode=600
  notify: reload prometheus

14
15
16
17
18
19
- name: install prometheus alert configuration
  copy: src=node.rules.yml dest=/etc/prometheus/node.rules.yml owner=root group=root mode=644
  notify: reload prometheus

- name: enable prometheus server service
  systemd: name=prometheus enabled=yes daemon_reload=yes state=started