From 3a91a4321ead47a6ddc0f2ead3a55cfdace13fd5 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Mon, 29 Feb 2016 15:21:17 -0500 Subject: [PATCH] added package to special 'squashable' fields apt has it as alias, this should fix https://github.com/ansible/ansible-modules-core/issues/3145 --- lib/ansible/executor/task_executor.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/ansible/executor/task_executor.py b/lib/ansible/executor/task_executor.py index f9938cf9a45..beceef18481 100644 --- a/lib/ansible/executor/task_executor.py +++ b/lib/ansible/executor/task_executor.py @@ -269,7 +269,12 @@ class TaskExecutor: if len(items) > 0 and task_action in self.SQUASH_ACTIONS: if all(isinstance(o, string_types) for o in 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 # contains a template that we can squash for