From c9c812343831be1bb56965b2aeff41eecdae0a11 Mon Sep 17 00:00:00 2001 From: Colin Wilk Date: Wed, 11 Oct 2023 15:34:10 +0200 Subject: Add run_once option for handlers 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 --- meta/argument_specs.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'meta/argument_specs.yml') diff --git a/meta/argument_specs.yml b/meta/argument_specs.yml index 502c640..9126bb8 100644 --- a/meta/argument_specs.yml +++ b/meta/argument_specs.yml @@ -36,6 +36,11 @@ argument_specs: required: false default: true + prometheus_target_handler_command_run_once: + type: bool + required: false + default: false + prometheus_target_handler_command: type: dict required: false @@ -52,6 +57,11 @@ argument_specs: required: false default: true + prometheus_target_handler_shell_run_once: + type: bool + required: false + default: false + prometheus_target_handler_shell: type: dict required: false -- cgit v1.2.3