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

Revert "now modules can implement with_items list globbing w/o updating"

This reverts commit 4942a06bc2.

Conflicts:

	lib/ansible/runner/__init__.py
This commit is contained in:
Michael DeHaan 2013-06-19 19:00:18 -04:00
parent e8db983684
commit d9c0a5c37d
4 changed files with 2 additions and 9 deletions

View file

@ -165,7 +165,6 @@ class Runner(object):
self.is_playbook = is_playbook
self.environment = environment
self.complex_args = complex_args
self.module_with_list = False
self.error_on_undefined_vars = error_on_undefined_vars
self.callbacks.runner = self
@ -414,8 +413,8 @@ class Runner(object):
if type(items) != list:
raise errors.AnsibleError("lookup plugins have to return a list: %r" % items)
if len(items) and utils.is_list_of_strings(items) and self.module_with_list:
# with_items maps back into a single module call, making modules that support this more efficient
if len(items) and utils.is_list_of_strings(items) and self.module_name in [ 'apt', 'yum', 'pkgng' ]:
# hack for apt, yum, and pkgng so that with_items maps back into a single module call
inject['item'] = ",".join(items)
items = None
@ -724,9 +723,6 @@ class Runner(object):
if 'WANT_JSON' in module_data:
module_style = 'non_native_want_json'
if 'WITH_ITEMS_USES_LIST' in module_data:
self.module_with_list = True
complex_args_json = utils.jsonify(complex_args)
# We force conversion of module_args to str because module_common calls shlex.split,
# a standard library function that incorrectly handles Unicode input before Python 2.7.3.

View file

@ -1,6 +1,5 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
# WITH_ITEMS_USES_LIST
# (c) 2012, Flowroute LLC
# Written by Matthew Williams <matthew@flowroute.com>

View file

@ -1,6 +1,5 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
# WITH_ITEMS_USES_LIST
# (c) 2013, bleader
# Written by bleader <bleader@ratonland.org>

View file

@ -1,6 +1,5 @@
#!/usr/bin/python -tt
# -*- coding: utf-8 -*-
# WITH_ITEMS_USES_LIST
# (c) 2012, Red Hat, Inc
# Written by Seth Vidal <skvidal at fedoraproject.org>