From 6749903e5703e88f6e9fc11a649c98fdaffae5c4 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Sat, 7 Apr 2012 14:51:00 -0400 Subject: [PATCH] Allow explicit request of the local connection. --- lib/ansible/connection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/connection.py b/lib/ansible/connection.py index 8fc3d991ecf..11faac402bd 100755 --- a/lib/ansible/connection.py +++ b/lib/ansible/connection.py @@ -41,7 +41,7 @@ class Connection(object): def connect(self, host): conn = None - if self._LOCALHOSTRE.search(host): + if self.transport == 'local' or self._LOCALHOSTRE.search(host): conn = LocalConnection(self.runner, host) elif self.transport == 'paramiko': conn = ParamikoConnection(self.runner, host)