removed task parameters (#74154)
* fixed clog * removed ignore * fix typose * removed ignore
This commit is contained in:
parent
7443e9d659
commit
45ab6fddf3
4 changed files with 6 additions and 16 deletions
2
changelogs/fragments/deprecated_task_parameters.yml
Normal file
2
changelogs/fragments/deprecated_task_parameters.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
removed_features:
|
||||
- task, inline parameters being auto coerced into variables has been removed.
|
|
@ -197,7 +197,7 @@ class Role(Base, Conditional, Taggable, CollectionSearch):
|
|||
|
||||
# copy over all field attributes from the RoleInclude
|
||||
# update self._attributes directly, to avoid squashing
|
||||
for (attr_name, _) in iteritems(self._valid_attrs):
|
||||
for (attr_name, dump) in iteritems(self._valid_attrs):
|
||||
if attr_name in ('when', 'tags'):
|
||||
self._attributes[attr_name] = self._extend_value(
|
||||
self._attributes[attr_name],
|
||||
|
|
|
@ -259,20 +259,10 @@ class Task(Base, Conditional, Taggable, CollectionSearch):
|
|||
elif k.startswith('with_') and k.replace("with_", "") in lookup_loader:
|
||||
# transform into loop property
|
||||
self._preprocess_with_loop(ds, new_ds, k, v)
|
||||
elif C.INVALID_TASK_ATTRIBUTE_FAILED or k in self._valid_attrs:
|
||||
new_ds[k] = v
|
||||
else:
|
||||
# pre-2.0 syntax allowed variables for include statements at the top level of the task,
|
||||
# so we move those into the 'vars' dictionary here, and show a deprecation message
|
||||
# as we will remove this at some point in the future.
|
||||
if action in C._ACTION_INCLUDE and k not in self._valid_attrs and k not in self.DEPRECATED_ATTRIBUTES:
|
||||
display.deprecated("Specifying include variables at the top-level of the task is deprecated."
|
||||
" Please see:\nhttps://docs.ansible.com/ansible/playbooks_roles.html#task-include-files-and-encouraging-reuse\n\n"
|
||||
" for currently supported syntax regarding included files and variables",
|
||||
version="2.12", collection_name='ansible.builtin')
|
||||
new_ds['vars'][k] = v
|
||||
elif C.INVALID_TASK_ATTRIBUTE_FAILED or k in self._valid_attrs:
|
||||
new_ds[k] = v
|
||||
else:
|
||||
display.warning("Ignoring invalid attribute: %s" % k)
|
||||
display.warning("Ignoring invalid attribute: %s" % k)
|
||||
|
||||
return super(Task, self).preprocess_data(new_ds)
|
||||
|
||||
|
|
|
@ -150,8 +150,6 @@ lib/ansible/playbook/conditional.py pylint:ansible-deprecated-version
|
|||
lib/ansible/playbook/helpers.py pylint:ansible-deprecated-version
|
||||
lib/ansible/playbook/helpers.py pylint:blacklisted-name
|
||||
lib/ansible/playbook/play_context.py pylint:ansible-deprecated-version
|
||||
lib/ansible/playbook/role/__init__.py pylint:blacklisted-name
|
||||
lib/ansible/playbook/task.py pylint:ansible-deprecated-version
|
||||
lib/ansible/plugins/action/__init__.py pylint:ansible-deprecated-version
|
||||
lib/ansible/plugins/action/async_status.py pylint:ansible-deprecated-version
|
||||
lib/ansible/plugins/action/normal.py action-plugin-docs # default action plugin for modules without a dedicated action plugin
|
||||
|
|
Loading…
Reference in a new issue