|
|
@ -5,6 +5,7 @@ from __future__ import (absolute_import, division, print_function)
|
|
|
|
__metaclass__ = type
|
|
|
|
__metaclass__ = type
|
|
|
|
|
|
|
|
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|
|
|
|
|
import re
|
|
|
|
import pty
|
|
|
|
import pty
|
|
|
|
import time
|
|
|
|
import time
|
|
|
|
import json
|
|
|
|
import json
|
|
|
@ -425,10 +426,18 @@ class TaskExecutor:
|
|
|
|
# name/pkg or the name/pkg field doesn't have any variables
|
|
|
|
# name/pkg or the name/pkg field doesn't have any variables
|
|
|
|
# and thus the items can't be squashed
|
|
|
|
# and thus the items can't be squashed
|
|
|
|
if template_no_item != template_with_item:
|
|
|
|
if template_no_item != template_with_item:
|
|
|
|
|
|
|
|
if self._task.loop_with and self._task.loop_with not in ('items', 'list'):
|
|
|
|
|
|
|
|
value_text = "\"{{ query('%s', %r) }}\"" % (self._task.loop_with, self._task.loop)
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
value_text = '%r' % self._task.loop
|
|
|
|
|
|
|
|
# Without knowing the data structure well, it's easiest to strip python2 unicode
|
|
|
|
|
|
|
|
# literals after stringifying
|
|
|
|
|
|
|
|
value_text = re.sub(r"\bu'", "'", value_text)
|
|
|
|
|
|
|
|
|
|
|
|
display.deprecated(
|
|
|
|
display.deprecated(
|
|
|
|
'Invoking "%s" only once while using a loop via squash_actions is deprecated. '
|
|
|
|
'Invoking "%s" only once while using a loop via squash_actions is deprecated. '
|
|
|
|
'Instead of using a loop to supply multiple items and specifying `%s: %s`, '
|
|
|
|
'Instead of using a loop to supply multiple items and specifying `%s: "%s"`, '
|
|
|
|
'please use `%s: %r` and remove the loop' % (self._task.action, found, name, found, self._task.loop),
|
|
|
|
'please use `%s: %s` and remove the loop' % (self._task.action, found, name, found, value_text),
|
|
|
|
version='2.11'
|
|
|
|
version='2.11'
|
|
|
|
)
|
|
|
|
)
|
|
|
|
for item in items:
|
|
|
|
for item in items:
|
|
|
|