mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
parent
0c64bbcd6f
commit
4e22677e7d
2 changed files with 4 additions and 4 deletions
|
@ -43,9 +43,9 @@ class ActionModule(ActionBase):
|
||||||
if module == 'auto':
|
if module == 'auto':
|
||||||
try:
|
try:
|
||||||
if self._task.delegate_to: # if we delegate, we should use delegated host's facts
|
if self._task.delegate_to: # if we delegate, we should use delegated host's facts
|
||||||
module = self._templar.template("{{hostvars['%s']['ansible_facts']['ansible_pkg_mgr']}}" % self._task.delegate_to)
|
module = self._templar.template("{{hostvars['%s']['ansible_pkg_mgr']}}" % self._task.delegate_to)
|
||||||
else:
|
else:
|
||||||
module = self._templar.template('{{ansible_facts["ansible_pkg_mgr"]}}')
|
module = self._templar.template('{{ansible_pkg_mgr}}')
|
||||||
except:
|
except:
|
||||||
pass # could not get it from template!
|
pass # could not get it from template!
|
||||||
|
|
||||||
|
|
|
@ -42,9 +42,9 @@ class ActionModule(ActionBase):
|
||||||
if module == 'auto':
|
if module == 'auto':
|
||||||
try:
|
try:
|
||||||
if self._task.delegate_to: # if we delegate, we should use delegated host's facts
|
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:
|
else:
|
||||||
module = self._templar.template('{{ansible_facts["ansible_service_mgr"]}}')
|
module = self._templar.template('{{ansible_service_mgr}}')
|
||||||
except:
|
except:
|
||||||
pass # could not get it from template!
|
pass # could not get it from template!
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue