aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tasks/main.yml
Commit message (Collapse)AuthorAgeFilesLines
* Add support for YAML strategyMagnus Kühne3 days1-5/+7
| | | | | | | | | | | | | Introduces a new 'yaml' strategy using Ansible's `from_yaml` to read target files. This allows users to group multiple targets with distinct label sets (e.g., severity or job) within a single file, optimizing Prometheus file-based service discovery. - Refactored task structure into `strategy_*.yml` for consistency. - Extracted shared exporter variable computation. - Implemented label merging where exporter labels override defaults. - Included support for groups and hosts without labels to prevent crashes. PR: (#1) https://github.com/kliwniloc/ansible-role-prometheus-target/pull/1
* Add run_once option for handlersColin Wilk2023-10-111-0/+7
| | | | | | | | | | | | | | This adds the run_once option for the two handler types (shell and command). The variables `prometheus_target_handler_command_run_once` and `prometheus_target_handler_shell_run_once` are introduced to control this behavior. For this change a switch from the Ansible Handlers to regular tasks was necessary to enforce run_once behavior with delegated hosts. If you don't rely on handler specific features such as deferring, nothing changes when using the role. Signed-off-by: Colin Wilk <colin.wilk@tum.de>
* initColin Wilk2023-05-261-0/+4
Signed-off-by: Colin Wilk <colin.wilk@tum.de>