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 --- molecule/default/molecule.yml | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'molecule/default/molecule.yml') diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index a8623d0..de1ac40 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -20,6 +20,15 @@ platforms: com.docker.network.driver.mtu: 1420 networks: - name: molecule-container-net + groups: [application_group] + + - name: application2 + image: ${MOLECULE_DISTRO:-debian:10} + dockerfile: Dockerfile.j2 + pre_build_image: false + networks: + - name: molecule-container-net + groups: [application_group] - name: prometheus image: ${MOLECULE_DISTRO:-debian:10} -- cgit v1.2.3