add --step option to ansible-playbooks to let people step through a playbook

one by one - asking for confirmation along the way.

also allows to 'continue' after a certain point
This commit is contained in:
Seth Vidal 2013-03-11 00:39:05 -04:00
commit 7687c2caf8
3 changed files with 21 additions and 2 deletions

View file

@ -301,7 +301,9 @@ class PlayBook(object):
''' run a single task in the playbook and recursively run any subtasks. '''
self.callbacks.on_task_start(utils.template(play.basedir, task.name, task.module_vars, lookup_fatal=False), is_handler)
if hasattr(self.callbacks, 'skip_task') and self.callbacks.skip_task:
return True
# load up an appropriate ansible runner to run the task in parallel
results = self._run_task_internal(task)