diff options
Diffstat (limited to 'lib/ansible/plugins/action/service.py')
-rw-r--r-- | lib/ansible/plugins/action/service.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ansible/plugins/action/service.py b/lib/ansible/plugins/action/service.py index d18c3fc4eb..dd0c796539 100644 --- a/lib/ansible/plugins/action/service.py +++ b/lib/ansible/plugins/action/service.py @@ -42,9 +42,9 @@ class ActionModule(ActionBase): if module == 'auto': try: if self._task.delegate_to: # if we delegate, we should use delegated host's facts - module = self._templar.template("{{hostvars['%s']['ansible_facts']['ansible_service_mgr']}}" % self._task.delegate_to) + module = self._templar.template("{{hostvars['%s']['ansible_service_mgr']}}" % self._task.delegate_to) else: - module = self._templar.template('{{ansible_facts["ansible_service_mgr"]}}') + module = self._templar.template('{{ansible_service_mgr}}') except: pass # could not get it from template! |