This repository has been archived on 2023-12-26. You can view files and clone it, but cannot push or open issues or pull requests.
hypervisors/ansible/roles/prometheus_agent/tasks/main.yml

21 lines
536 B
YAML

- name: Create prometheus directory
file:
path: /root/prometheus
state: directory
- name: Copy prometheus config
copy:
src: "{{ role_path }}/prometheus.yml"
dest: /root/prometheus/prometheus.yml
- name: Copy prometheus systemd unit
copy:
src: "{{ role_path }}/container-prometheus.service"
dest: /etc/systemd/system/container-prometheus.service
notify: systemd daemon reload
- name: Enable prometheus systemd unit
systemd:
name: container-prometheus.service
enabled: true
state: started