1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/docs/docsite/rst/user_guide/playbooks_startnstep.rst

35 lines
969 B
ReStructuredText
Raw Normal View History

Start and Step
======================
This shows a few alternative ways to run playbooks. These modes are very useful for testing new plays or debugging.
2014-12-16 21:25:41 +01:00
.. _start_at_task:
Start-at-task
`````````````
If you want to start executing your playbook at a particular task, you can do so with the ``--start-at-task`` option::
ansible-playbook playbook.yml --start-at-task="install packages"
The above will start executing your playbook at a task named "install packages".
2014-12-16 21:25:41 +01:00
.. _step:
Step
````
Playbooks can also be executed interactively with ``--step``::
ansible-playbook playbook.yml --step
This will cause ansible to stop on each task, and ask if it should execute that task.
Say you had a task called "configure ssh", the playbook run will stop and ask::
Perform task: configure ssh (y/n/c):
Answering "y" will execute the task, answering "n" will skip the task, and answering "c"
will continue executing all the remaining tasks without asking.