mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
969 B
ReStructuredText
35 lines
969 B
ReStructuredText
10 years ago
|
Start and Step
|
||
|
======================
|
||
|
|
||
10 years ago
|
This shows a few alternative ways to run playbooks. These modes are very useful for testing new plays or debugging.
|
||
10 years ago
|
|
||
|
|
||
10 years ago
|
.. _start_at_task:
|
||
10 years ago
|
|
||
10 years ago
|
Start-at-task
|
||
|
`````````````
|
||
10 years ago
|
If you want to start executing your playbook at a particular task, you can do so with the ``--start-at-task`` option::
|
||
10 years ago
|
|
||
10 years ago
|
ansible-playbook playbook.yml --start-at-task="install packages"
|
||
10 years ago
|
|
||
|
The above will start executing your playbook at a task named "install packages".
|
||
|
|
||
|
|
||
10 years ago
|
.. _step:
|
||
10 years ago
|
|
||
10 years ago
|
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.
|
||
|
|