mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 20:01:25 -07:00
Revert "Allow including files through variables"
This reverts commit bf47bb4753
.
Conflicts:
lib/ansible/utils.py
test/TestUtils.py
This commit is contained in:
parent
1bd9ea6440
commit
b8c4bb9e6e
9 changed files with 30 additions and 80 deletions
|
@ -16,7 +16,7 @@ class TestUtils(unittest.TestCase):
|
|||
}
|
||||
}
|
||||
|
||||
res = ansible.utils.varLookup('${data.who}', vars)
|
||||
res = ansible.utils._varLookup('data.who', vars)
|
||||
|
||||
assert sorted(res) == sorted(vars['data']['who'])
|
||||
|
||||
|
@ -209,24 +209,10 @@ class TestUtils(unittest.TestCase):
|
|||
'person': 'one',
|
||||
}
|
||||
|
||||
res = ansible.utils.template(None, template, vars)
|
||||
res = ansible.utils.template(template, vars)
|
||||
|
||||
assert res == u'hello oh great one'
|
||||
|
||||
def test_varReplace_include(self):
|
||||
template = 'hello $FILE(world)'
|
||||
|
||||
res = ansible.utils.template("test", template, {})
|
||||
|
||||
assert res == u'hello world\n'
|
||||
|
||||
def test_varReplace_include_script(self):
|
||||
template = 'hello $PIPE(echo world)'
|
||||
|
||||
res = ansible.utils.template("test", template, {})
|
||||
|
||||
assert res == u'hello world\n'
|
||||
|
||||
#####################################
|
||||
### Template function tests
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue