From f27e2fd285c6014666249b6a71480c2b7af2b465 Mon Sep 17 00:00:00 2001 From: James Tanner Date: Fri, 25 Oct 2013 15:30:02 -0400 Subject: [PATCH] Fixes #4448 reloaded services should be started if not running --- system/service | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/system/service b/system/service index bd03672d8b9..fb9364c24f5 100644 --- a/system/service +++ b/system/service @@ -272,7 +272,7 @@ class Service(object): if self.state and self.running is None: self.module.fail_json(msg="failed determining service state, possible typo of service name?") # Find out if state has changed - if not self.running and self.state in ["started", "running"]: + if not self.running and self.state in ["started", "running", "reloaded"]: self.svc_change = True elif self.running and self.state in ["stopped","reloaded"]: self.svc_change = True @@ -288,6 +288,8 @@ class Service(object): # Control service if self.state in ['started', 'running']: self.action = "start" + elif not self.running and self.state == 'reloaded': + self.action = "start" elif self.state == 'stopped': self.action = "stop" elif self.state == 'reloaded':