diff --git a/lib/ansible/executor/task_executor.py b/lib/ansible/executor/task_executor.py index b91e480742..0b2c5b4a7f 100644 --- a/lib/ansible/executor/task_executor.py +++ b/lib/ansible/executor/task_executor.py @@ -518,10 +518,7 @@ class TaskExecutor: if '_variable_params' in self._task.args: variable_params = self._task.args.pop('_variable_params') if isinstance(variable_params, dict): - display.deprecated("Using variables for task params is unsafe, especially if the variables come from an external source like facts", - version="2.6") - variable_params.update(self._task.args) - self._task.args = variable_params + raise AnsibleError("Using a variable for a task's 'args' is not allowed as it is unsafe, facts can come from untrusted sources.") # get the connection and the handler for this execution if (not self._connection or