mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Merge varFind and varLookup
This commit is contained in:
@@ -230,6 +230,14 @@ class TestUtils(unittest.TestCase):
|
||||
res = ansible.utils.varReplace(template, vars, expand_lists=True)
|
||||
assert res == 'yum pkg=foo,bar,baz state=installed'
|
||||
|
||||
def test_varReplace_escaped_var(self):
|
||||
vars = {
|
||||
'foo': 'bar',
|
||||
}
|
||||
template = 'action \$foo'
|
||||
res = ansible.utils.varReplace(template, vars)
|
||||
assert res == 'action $foo'
|
||||
|
||||
def test_template_varReplace_iterated(self):
|
||||
template = 'hello $who'
|
||||
vars = {
|
||||
|
||||
Reference in New Issue
Block a user