mirror of
https://gitea.0xace.cc/ansible-galaxy/postgres-exporter.git
synced 2024-11-24 23:36:42 +00:00
26 lines
832 B
YAML
26 lines
832 B
YAML
---
|
|
- name: Install prometheus repository
|
|
ansible.builtin.yum_repository:
|
|
name: "{{ item.name }}"
|
|
description: "{{ item.description }}"
|
|
file: "{{ item.file }}"
|
|
baseurl: "{{ item.baseurl }}"
|
|
gpgcheck: "{{ item.gpgcheck | default('no') }}"
|
|
enabled: "{{ item.enabled | default('yes') }}"
|
|
repo_gpgcheck: "{{ item.repo_gpgcheck | default('no') }}"
|
|
gpgkey: "{{ item.gpgkey | default('omit') }}"
|
|
loop: "{{ postgres_exporter_rpm_repository }}"
|
|
|
|
- name: Ensure {{ postgres_exporter_package }} version {{ postgres_exporter_version }} installed
|
|
dnf:
|
|
name: "{{ postgres_exporter_package }}"
|
|
state: present
|
|
|
|
- name: Enable and start {{ postgres_exporter_unit_name }}
|
|
systemd:
|
|
name: "{{ postgres_exporter_unit_name }}"
|
|
state: started
|
|
enabled: yes
|
|
masked: no
|
|
daemon_reload: yes
|