top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

Does Ansible provide any option to start from a particular task of a playbook ?

0 votes
25 views

A playbook may consist of multiple tasks and as per my understanding it runs from top to bottom. Is there any way to start execution from a task other than first one ? If yes then what is the way to do that ?

posted Apr 30, 2017 by Vikram Singh

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

1 Answer

0 votes

Hi Vikram,
You are correct, normally playbook execution starts from top and goes to bottom but Ansible provides very useful options which can be used. While running playbook you can use the following option to run tasks from a specific path:

$ansible-playbook playbook.yml --start-at-task="install packages"

Reference:
http://docs.ansible.com/ansible/playbooks_startnstep.html

answer May 1, 2017 by Harshita
Thanks a lot.
Similar Questions
+1 vote

Is there any option to control execution of ansible playbook by mean of user interactive mode ? I mean before executing any task it prompts for the user input and based on user input it takes action to run or not.

0 votes

There is a possibility on one controller multiple people are working and all of them have login credentials of controller node. Assume someone is editing one playbook but he/she does not let others to see the changes. Is there any way in Ansible by which a user can stop others to edit/read the file ?

+1 vote

What is Ansible and how does it work ?

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...