summaryrefslogtreecommitdiff
path: root/lib/ansible/plugins/action/service.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ansible/plugins/action/service.py')
-rw-r--r--lib/ansible/plugins/action/service.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ansible/plugins/action/service.py b/lib/ansible/plugins/action/service.py
index fc1704c386..8cceb85e94 100644
--- a/lib/ansible/plugins/action/service.py
+++ b/lib/ansible/plugins/action/service.py
@@ -20,6 +20,7 @@ __metaclass__ = type
from ansible.plugins.action import ActionBase
+
class ActionModule(ActionBase):
TRANSFERS_FILES = False
@@ -43,7 +44,7 @@ class ActionModule(ActionBase):
if not 'failed' in facts:
module = getattr(facts['ansible_facts'], 'ansible_service_mgr', 'auto')
- if not module or module == 'auto':
+ if not module or module == 'auto' or module not in self._shared_loader_obj.module_loader:
module = 'service'
if module != 'auto':