mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-28 21:31:26 -07:00
Fix errors in lookup plugins.
Lookup plugins 'sequence' and 'template' now import 'ansible.utils' appropriately in order to use the 'listify_lookup_plugin_terms' function. Also, 'dnstxt' and 'env' now check to see if 'terms' is a string; without this calls like '{{ lookup('env', 'HOME') }}' fail.
This commit is contained in:
parent
cce2cad8dc
commit
663d37b537
5 changed files with 9 additions and 5 deletions
|
@ -16,7 +16,7 @@
|
|||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue