added package to special 'squashable' fields

apt has it as alias, this should fix https://github.com/ansible/ansible-modules-core/issues/3145
This commit is contained in:
Brian Coca 2016-02-29 15:21:17 -05:00
parent 7c3a728557
commit 67d5b77898

View file

@ -269,7 +269,12 @@ class TaskExecutor:
if len(items) > 0 and task_action in self.SQUASH_ACTIONS: if len(items) > 0 and task_action in self.SQUASH_ACTIONS:
if all(isinstance(o, string_types) for o in items): if all(isinstance(o, string_types) for o in items):
final_items = [] final_items = []
name = self._task.args.pop('name', None) or self._task.args.pop('pkg', None)
name = None
for allowed in ['name', 'pkg', 'package']:
name = self._task.args.pop(allowed, None)
if name is not None:
break
# This gets the information to check whether the name field # This gets the information to check whether the name field
# contains a template that we can squash for # contains a template that we can squash for