summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Coca <brian.coca+git@gmail.com>2017-01-09 11:15:23 -0500
committerBrian Coca <brian.coca+git@gmail.com>2017-01-09 11:15:23 -0500
commit6e558aa4296b00d1056eb773bb0d6ab81b1a0f11 (patch)
tree7d6dcfdd8c65ff252fd5a745f081ea30f689c321
parentb593828f08430a26271049dc8ad0129229c7ff0e (diff)
downloadansible-modules-core-6e558aa4296b00d1056eb773bb0d6ab81b1a0f11.tar.gz
backport of service fix
-rw-r--r--system/service.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/system/service.py b/system/service.py
index bf4ef164..04c671c9 100644
--- a/system/service.py
+++ b/system/service.py
@@ -602,11 +602,9 @@ class LinuxService(Service):
cleanout = status_stdout.lower().replace(self.name.lower(), '')
if "stop" in cleanout:
self.running = False
- elif "run" in cleanout and "not" in cleanout:
- self.running = False
- elif "run" in cleanout and "not" not in cleanout:
- self.running = True
- elif "start" in cleanout and "not" not in cleanout:
+ elif "run" in cleanout:
+ self.running = ("not " in cleanout)
+ elif "start" in cleanout and "not " not in cleanout:
self.running = True
elif 'could not access pid file' in cleanout:
self.running = False