diff --git a/lib/ansible/runner/lookup_plugins/dnstxt.py b/lib/ansible/runner/lookup_plugins/dnstxt.py
index 7c56d8a00b..28ec2e7b61 100644
--- a/lib/ansible/runner/lookup_plugins/dnstxt.py
+++ b/lib/ansible/runner/lookup_plugins/dnstxt.py
@@ -44,8 +44,8 @@ class LookupModule(object):
terms = utils.listify_lookup_plugin_terms(terms, self.basedir, inject)
-
-
+ if isinstance(basestring, terms):
+ terms = [ terms ]
ret = []
for term in terms:
diff --git a/lib/ansible/runner/lookup_plugins/env.py b/lib/ansible/runner/lookup_plugins/env.py
index bd0fc4f6d9..86b1da5aaa 100644
--- a/lib/ansible/runner/lookup_plugins/env.py
+++ b/lib/ansible/runner/lookup_plugins/env.py
@@ -27,6 +27,9 @@ class LookupModule(object):
terms = utils.listify_lookup_plugin_terms(terms, self.basedir, inject)
+ if isinstance(basestring, terms):
+ terms = [ terms ]
+
ret = []
for term in terms:
var = term.split()[0]
diff --git a/lib/ansible/runner/lookup_plugins/fileglob.py b/lib/ansible/runner/lookup_plugins/fileglob.py
index 2dd2342d26..254f48bec7 100644
--- a/lib/ansible/runner/lookup_plugins/fileglob.py
+++ b/lib/ansible/runner/lookup_plugins/fileglob.py
@@ -26,7 +26,7 @@ class LookupModule(object):
def run(self, terms, inject=None, **kwargs):
- utils.listify_lookup_plugin_terms(terms, self.basedir, inject)
+ terms = utils.listify_lookup_plugin_terms(terms, self.basedir, inject)
ret = []
diff --git a/lib/ansible/runner/lookup_plugins/sequence.py b/lib/ansible/runner/lookup_plugins/sequence.py
index ef07417fc8..8d70aad98c 100644
--- a/lib/ansible/runner/lookup_plugins/sequence.py
+++ b/lib/ansible/runner/lookup_plugins/sequence.py
@@ -16,7 +16,7 @@
# along with Ansible. If not, see .
from ansible.errors import AnsibleError
-from ansible.utils import parse_kv
+import ansible.utils as utils
from re import compile as re_compile, IGNORECASE
# shortcut format
@@ -181,7 +181,7 @@ class LookupModule(object):
try:
if not self.parse_simple_args(term):
- self.parse_kv_args(parse_kv(term))
+ self.parse_kv_args(utils.parse_kv(term))
except Exception:
raise AnsibleError(
"unknown error parsing with_sequence arguments: %r"
diff --git a/lib/ansible/runner/lookup_plugins/template.py b/lib/ansible/runner/lookup_plugins/template.py
index f1d877797a..e009b6b76b 100644
--- a/lib/ansible/runner/lookup_plugins/template.py
+++ b/lib/ansible/runner/lookup_plugins/template.py
@@ -16,6 +16,7 @@
# along with Ansible. If not, see .
from ansible.utils import template
+import ansible.utils as utils
class LookupModule(object):