예제 #1
0
 def _run_module(self, module_args):
     set_module_args(module_args)
     with pytest.raises(AnsibleExitJson) as ex:
         self.module.main()
     return ex.value.args[0]
 def _run_module_with_fail_json(self, module_args):
     set_module_args(module_args)
     with pytest.raises(AnsibleFailJson) as exc:
         self.module.main()
     result = exc.value.args[0]
     return result