aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorColin Wilk <colin@wilk.cx>2026-08-11 01:07:12 +0200
committerColin Wilk <colin@wilk.cx>2026-08-11 01:07:48 +0200
commita200923371d215a478b1c4d645480540bd369dc7 (patch)
treeae8bf9dd0208a21d4087d75c9e06c6282aa70d68
parentc267536ecfbcf37e68226ade2ed29c3b1f356a98 (diff)
downloadansible-role-prometheus-target-a200923371d215a478b1c4d645480540bd369dc7.tar.gz
ansible-role-prometheus-target-a200923371d215a478b1c4d645480540bd369dc7.zip
Improve README with quickstart example
-rw-r--r--README.md31
1 files changed, 30 insertions, 1 deletions
diff --git a/README.md b/README.md
index 5e5ce86..9bce11c 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,35 @@
# Ansible Role: Prometheus Target
-An Ansible role for deploying Prometheus targets right from your playbooks.
+Manage Prometheus targets from the hosts you deploy. Define exporter conventions
+once in `group_vars`, then register every host automatically in the right target
+file.
+
+## Quickstart
+
+Apply the role to the hosts you want Prometheus to monitor. The role updates the
+target file on `prometheus_target_host`, so that host must be present and
+reachable in your Ansible inventory.
+
+```yaml
+- name: Register node exporters with Prometheus
+ hosts: applications
+
+ # Possibly group vars
+ vars:
+ prometheus_target_host: prometheus
+ prometheus_target_exporter_defaults:
+ node_exporter:
+ path: /etc/prometheus/targets/nodes.yml
+ host: "{{ inventory_hostname }}:9100"
+
+ roles:
+ - role: kliwniloc.prometheus_target
+ prometheus_target_exporter:
+ - id: node_exporter
+```
+
+Define common exporter settings in `prometheus_target_exporter_defaults`; each
+host can then register an exporter with its ID.
## Installation