From e0110903c7dcbb21fdc2975244e04c5a07ad13d0 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Sat, 15 Nov 2014 17:01:25 -0500 Subject: [PATCH 1/3] put start and step docs into their own topic, moved from playbook_intro which is meant to be kept simple --- docsite/rst/playbooks_special_topics.rst | 1 + docsite/rst/playbooks_startnstep.rst | 38 ++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 docsite/rst/playbooks_startnstep.rst diff --git a/docsite/rst/playbooks_special_topics.rst b/docsite/rst/playbooks_special_topics.rst index 078b27f253..c57f5796c9 100644 --- a/docsite/rst/playbooks_special_topics.rst +++ b/docsite/rst/playbooks_special_topics.rst @@ -17,3 +17,4 @@ and adopt these only if they seem relevant or useful to your environment. playbooks_prompts playbooks_tags playbooks_vault + playbooks_startnstep diff --git a/docsite/rst/playbooks_startnstep.rst b/docsite/rst/playbooks_startnstep.rst new file mode 100644 index 0000000000..1238a710d8 --- /dev/null +++ b/docsite/rst/playbooks_startnstep.rst @@ -0,0 +1,38 @@ +Start and Step +====================== +.. versionadded:: 1.8 + +.. contents:: Topics + +This shows a few special ways to run playbooks, very useful for testing and debugging. + + +Start-at-task +````````````` +.. versionadded:: 1.2 + +If you want to start executing your playbook at a particular task, you can do so +with the ``--start-at`` option:: + + ansible-playbook playbook.yml --start-at="install packages" + +The above will start executing your playbook at a task named "install packages". + + +Step +```` +.. versionadded:: 1.1 + + +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. + From 897965ce4df7c64c47a62851c8b55dd543632f21 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Sat, 15 Nov 2014 17:09:55 -0500 Subject: [PATCH 2/3] removed start/step from intro, added markers to start n step --- docsite/rst/playbooks_intro.rst | 19 ------------------- docsite/rst/playbooks_startnstep.rst | 5 ++++- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/docsite/rst/playbooks_intro.rst b/docsite/rst/playbooks_intro.rst index cc55f28261..4bc3bccf2d 100644 --- a/docsite/rst/playbooks_intro.rst +++ b/docsite/rst/playbooks_intro.rst @@ -335,25 +335,6 @@ Let's run a playbook using a parallelism level of 10:: ansible-playbook playbook.yml -f 10 -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. - -If you want to start executing your playbook at a particular task, you can do so -with the ``--start-at`` option:: - - ansible-playbook playbook.yml --start-at="install packages" - -The above will start executing your playbook at a task named "install packages". - .. _ansible-pull: Ansible-Pull diff --git a/docsite/rst/playbooks_startnstep.rst b/docsite/rst/playbooks_startnstep.rst index 1238a710d8..c2f0d7514c 100644 --- a/docsite/rst/playbooks_startnstep.rst +++ b/docsite/rst/playbooks_startnstep.rst @@ -1,12 +1,13 @@ Start and Step ====================== -.. versionadded:: 1.8 .. contents:: Topics This shows a few special ways to run playbooks, very useful for testing and debugging. +.. _start_at_task + Start-at-task ````````````` .. versionadded:: 1.2 @@ -19,6 +20,8 @@ with the ``--start-at`` option:: The above will start executing your playbook at a task named "install packages". +.. _step + Step ```` .. versionadded:: 1.1 From d1e80ea1e60a908550474520c2de56954bb7c313 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Mon, 17 Nov 2014 11:17:47 -0500 Subject: [PATCH 3/3] removed version added info, too old to matter small rephrasing for clarification --- docsite/rst/playbooks_startnstep.rst | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/docsite/rst/playbooks_startnstep.rst b/docsite/rst/playbooks_startnstep.rst index c2f0d7514c..ac06962cf2 100644 --- a/docsite/rst/playbooks_startnstep.rst +++ b/docsite/rst/playbooks_startnstep.rst @@ -1,19 +1,14 @@ Start and Step ====================== -.. contents:: Topics - -This shows a few special ways to run playbooks, very useful for testing and debugging. +This shows a few alternative ways to run playbooks. These modes are very useful for testing new plays or debugging. .. _start_at_task Start-at-task ````````````` -.. versionadded:: 1.2 - -If you want to start executing your playbook at a particular task, you can do so -with the ``--start-at`` option:: +If you want to start executing your playbook at a particular task, you can do so with the ``--start-at`` option:: ansible-playbook playbook.yml --start-at="install packages" @@ -24,8 +19,6 @@ The above will start executing your playbook at a task named "install packages". Step ```` -.. versionadded:: 1.1 - Playbooks can also be executed interactively with ``--step``::