From 01819bbc9d99a75ff51dbf3e2214e1d12485652c Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Thu, 26 May 2016 13:55:48 -0400 Subject: [PATCH] fixed enabled reporting --- lib/ansible/modules/system/systemd.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/system/systemd.py b/lib/ansible/modules/system/systemd.py index 225055ee722..7dbd695b114 100644 --- a/lib/ansible/modules/system/systemd.py +++ b/lib/ansible/modules/system/systemd.py @@ -321,7 +321,8 @@ def main(): (rc, out, err) = module.run_command("%s %s '%s'" % (systemctl, action, unit)) if rc != 0: module.fail_json(msg="Unable to %s service %s: %s" % (action, unit, err)) - result['enabled'] = module.params['enabled'] + + result['enabled'] = enabled if module.params['state'] is not None: # What is current service state?