From fa1c0e3ceb74fd664e350e455ba99f58cc512600 Mon Sep 17 00:00:00 2001 From: alex Date: Mon, 2 Jul 2012 21:34:11 +0200 Subject: [PATCH 1/2] Fixed: executing templates outside playbooks --- lib/ansible/runner/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/runner/__init__.py b/lib/ansible/runner/__init__.py index 075a9fba838..d976b70cf0f 100644 --- a/lib/ansible/runner/__init__.py +++ b/lib/ansible/runner/__init__.py @@ -567,7 +567,7 @@ class Runner(object): metadata = '/etc/ansible/setup' else: # path is expanded on remote side - metadata = "~/.ansible/setup" + metadata = "~/.ansible/tmp/.ansible/setup" # install the template module slurp_module = self._transfer_module(conn, tmp, 'slurp') From d3b2b2f6f75c03bcef06fd9ff3330bff512734a3 Mon Sep 17 00:00:00 2001 From: alex Date: Mon, 2 Jul 2012 22:04:56 +0200 Subject: [PATCH 2/2] Fixed: pathname for tmp --- lib/ansible/runner/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ansible/runner/__init__.py b/lib/ansible/runner/__init__.py index d976b70cf0f..b35dddd6898 100644 --- a/lib/ansible/runner/__init__.py +++ b/lib/ansible/runner/__init__.py @@ -269,13 +269,13 @@ class Runner(object): if self.remote_user == 'root': args = "%s metadata=/etc/ansible/setup" % args else: - args = "%s metadata=%s/.ansible/setup" % (args, C.DEFAULT_REMOTE_TMP) + args = "%s metadata=%s/setup" % (args, C.DEFAULT_REMOTE_TMP) else: if not 'metadata' in args: if self.remote_user == 'root': args['metadata'] = '/etc/ansible/setup' else: - args['metadata'] = "%s/.ansible/setup" % C.DEFAULT_REMOTE_TMP + args['metadata'] = "%s/setup" % C.DEFAULT_REMOTE_TMP return args # ***************************************************** @@ -567,7 +567,7 @@ class Runner(object): metadata = '/etc/ansible/setup' else: # path is expanded on remote side - metadata = "~/.ansible/tmp/.ansible/setup" + metadata = "~/.ansible/tmp/setup" # install the template module slurp_module = self._transfer_module(conn, tmp, 'slurp')