mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-08 09:24:01 -07:00
Merge varFind and varLookup
This commit is contained in:
parent
572c66b7f6
commit
c9c5fc1456
2 changed files with 47 additions and 37 deletions
|
@ -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 = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue