From f5cdabd4667ba8a65dbfbf762ae6ccfc4e8f72bc Mon Sep 17 00:00:00 2001 From: Andy Feller Date: Wed, 22 Jun 2016 08:01:49 -0400 Subject: [PATCH] Enhance apache restart handler to allow for reloading configuration versus restarting service --- defaults/main.yml | 3 +++ handlers/main.yml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 4acdfce..adfd38b 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -42,3 +42,6 @@ apache_mods_disabled: [] # Set initial apache state. Recommended values: `started` or `stopped` apache_state: started + +# Set apache state when configuration changes are made. Recommended values: `restarted` or `reloaded` +apache_restart_state: restarted diff --git a/handlers/main.yml b/handlers/main.yml index 25d14ec..53abffb 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -2,4 +2,4 @@ - name: restart apache service: name: "{{ apache_service }}" - state: restarted + state: "{{ apache_restart_state }}"