From 127f0bd84f353d214bd0b829e40f2cac10805c61 Mon Sep 17 00:00:00 2001
From: anima
Date: Sun, 2 Feb 2025 20:23:41 +0100
Subject: [PATCH] add doc for auto ticket
---
README.md | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/README.md b/README.md
index 24c30a0..39fce39 100644
--- a/README.md
+++ b/README.md
@@ -27,10 +27,22 @@ Hints:
* API user setup only runs once at start up!
* Redis conf runs every time
+If you plan to use satellites and wish full auto deployment.
+Set ICINGA2_API_USER_SATELLITE_PASS to get a API user for ticket generation (only on fist init).
+
+Then you can use this:
+```
+curl -k -s -u pki-ticket:$ICINGA2_API_USER_SATELLITE_PASS -H 'Accept: application/json' \
+ -X POST 'https://ip-of-icinga2:5665/v1/actions/generate-ticket' -d '{ "cn": "satellite.example.com" }'
+```
+
+see: [CSR Auto-Signing: On the master](https://icinga.com/docs/icinga-2/latest/doc/06-distributed-monitoring/#csr-auto-signing-on-the-master)
+
## vars
var | description | note
--- | --- | ---
+ICINGA_API_HOST:-icinga2 | hostname / cn of icinga2 |
ICINGA2_API_USER_ROOT_PASS | replace `root` API user randome password with this | only on first setup
ICINGA2_API_USER_ICINGAWEB_PASS | create API user `icingadb` with this password | only on first setup, if not set user will not create
ICINGA2_API_USER_SATELLITE_PASS | create API user `pki-ticket` with this password | only on first setup, if not set user will not create