From 1ee7ff2f7b78d4ef76bacf41f078222d10d70848 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Thu, 31 May 2012 22:08:00 -0400 Subject: [PATCH] To allow plays using different user accounts in the same playbook to function, clear the setup cache between plays. --- lib/ansible/playbook/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/playbook/__init__.py b/lib/ansible/playbook/__init__.py index 4f24d0a9ad0..b545f2dea68 100644 --- a/lib/ansible/playbook/__init__.py +++ b/lib/ansible/playbook/__init__.py @@ -81,7 +81,7 @@ class PlayBook(object): """ self.SETUP_CACHE = {} - + if playbook is None or callbacks is None or runner_callbacks is None or stats is None: raise Exception('missing required arguments') @@ -122,6 +122,7 @@ class PlayBook(object): # loop through all patterns and run them self.callbacks.on_start() for play_ds in self.playbook: + self.SETUP_CACHE = {} self._run_play(Play(self,play_ds)) # summarize the results