Add shorthand debugger method to recreate the task from the original ds (#46987)

* Add shorthand debugger method to recreate the task from the original ds, and re-template. Fixes #46321

* Fix rst header

* Indicate update_task was added in 2.8
This commit is contained in:
Matt Martz
2018-10-25 16:35:59 -05:00
committed by GitHub
parent 6c2e4c1ca8
commit f7ba63e047
2 changed files with 22 additions and 0 deletions

View File

@@ -235,6 +235,7 @@ Let's use the same playbook above, but fix ``task_vars`` instead of args::
[192.0.2.10] TASK: install package (debug)> task_vars['pkg_name'] = 'bash'
[192.0.2.10] TASK: install package (debug)> p task_vars['pkg_name']
'bash'
[192.0.2.10] TASK: install package (debug)> update_task
[192.0.2.10] TASK: install package (debug)> redo
Then the task runs again with new ``task_vars``.
@@ -242,6 +243,17 @@ Then the task runs again with new ``task_vars``.
.. note::
In 2.5 this was updated from ``vars`` to ``task_vars`` to not conflict with the ``vars()`` python function.
.. _update_task_command:
u(pdate_task)
`````````````
.. versionadded:: 2.8
This command re-creates the task from the original task data structure, and templates with updated ``task_vars``
See the above documentation for :ref:`update_vars_command` for an example of use.
.. _redo_command:
r(edo)