ansible/ansible — pull request #5527 by sergevanginderachter (2014-01-07 13:49:14+00:00)
Title: path_dwim: fix when basedir not set

I bumped into a small bug. Easily patched, but I'm not 100% sure what I did is the best way here.

Can be reproduced with this basic playbook
```
- hosts: localhost
gather_facts: false
connection: local

vars:
my: "{{ lookup('password','tmppwfile') }}"
tasks:
- debug: var=my
```

Which yields this traceback:

```
fatal: [localhost] => Traceback (most recent call last):
File "/home/serge/src/ansible/lib/ansible/runner/__init__.py", line 426, in _executor
exec_rc = self._executor_internal(host, new_stdin)
File "/home/serge/src/ansible/lib/ansible/runner/__init__.py", line 517, in _executor_internal
return self._executor_internal_inner(host, self.module_name, self.module_args, inject, port, complex_args=complex_args)
File "/home/serge/src/ansible/lib/ansible/runner/__init__.py", line 717, in _executor_internal_inner
result = handler.run(conn, tmp, module_name, module_args, inject, complex_args)
File "/home/serge/src/ansible/lib/ansible/runner/action_plugins/debug.py", line 53, in run
results = template.template(None, "{{ %s }}" % args['var'], inject)
File "/home/serge/src/ansible/lib/ansible/utils/template.py", line 319, in template
varname = template_from_string(basedir, varname, vars, fail_on_undefined)
File "/home/serge/src/ansible/lib/ansible/utils/template.py", line 546, in template_from_string
res = jinja2.utils.concat(rf)
File "