1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

changed to default 'auto' as it better describes the use= option

This commit is contained in:
Brian Coca 2015-07-16 16:44:33 -04:00
parent d2f93511df
commit 978390693b

View file

@ -29,20 +29,21 @@ class ActionModule(ActionBase):
name = self._task.args.get('name', None)
state = self._task.args.get('state', None)
module = self._task.args.get('use', None)
module = self._task.args.get('use', 'auto')
if module is None:
if module == 'auto':
try:
module = self._templar.template('{{ansible_pkg_mgr}}')
except:
pass # could not get it from template!
if module is None:
#TODO: autodetect the package manager, by invoking that specific fact snippet remotely
if module == 'auto':
#FIXME: autodetect the package manager run facts module remotely to get ansible_pkg_mgr
#module = self._execute_module(module_name=setup, module_args={filter: 'ansible_pkg_mgr'}, task_vars=task_vars)
pass
if module is not None:
if module != 'auto':
# run the 'package' module
new_module_args = self._task.args.copy()
if 'use' in new_module_args: