This commit is contained in:
2023-04-28 04:25:32 -04:00
parent 81d2ea447a
commit ab0401f27b
34 changed files with 144 additions and 144 deletions

View File

@@ -1,26 +1,26 @@
- name: Install Prometheus node exporter
apt:
ansible.builtin.apt:
name: prometheus-node-exporter
state: present
- name: Run Prometheus node exporter
service:
ansible.builtin.service:
name: prometheus-node-exporter
state: started
- name: Create Prometheus data directory
file:
ansible.builtin.file:
path: "{{ prom_root }}/prometheus"
state: directory
owner: nobody
- name: Create Prometheus config directory
file:
ansible.builtin.file:
path: "{{ prom_root }}/config"
state: directory
- name: Install Prometheus configuration
template:
ansible.builtin.template:
src: prometheus.yml.j2
dest: "{{ prom_root }}/config/prometheus.yml"