mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-28 03:00:23 -07:00
Allow args: var to be used to pass a variable in bare, and also templated versions should also DWIM.
This commit is contained in:
parent
6c778acd91
commit
e12f91799c
2 changed files with 14 additions and 3 deletions
|
@ -703,6 +703,9 @@ def safe_eval(str):
|
|||
return var.startswith("$") or '{{' in var
|
||||
|
||||
# do not allow method calls to modules
|
||||
if not isinstance(str, basestring):
|
||||
# already templated to a datastructure, perhaps?
|
||||
return str
|
||||
if re.search(r'\w\.\w+\(', str):
|
||||
return str
|
||||
# do not allow imports
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue