mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-27 23:21:22 -07:00
Allow modules to return facts.
If the module result contains "ansible_facts", that will be added to the setup cache.
This commit is contained in:
parent
ec56b30248
commit
2dc9a563ef
6 changed files with 30 additions and 13 deletions
|
@ -85,15 +85,17 @@ class TestRunner(unittest.TestCase):
|
|||
if not get_binary("facter"):
|
||||
raise SkipTest
|
||||
result = self._run('facter',[])
|
||||
assert "hostname" in result
|
||||
assert "hostname" in result['ansible_facts']
|
||||
|
||||
# temporarily disbabled since it occasionally hangs
|
||||
# ohai's fault, setup module doesn't actually run this
|
||||
# to get ohai's "facts" anyway
|
||||
#
|
||||
#def test_ohai(self):
|
||||
# if not get_binary("facter"):
|
||||
# raise SkipTest
|
||||
# result = self._run('ohai',[])
|
||||
# assert "hostname" in result
|
||||
# assert "hostname" in result['ansible_facts']
|
||||
|
||||
def test_copy(self):
|
||||
# test copy module, change trigger, etc
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue