def execute(self, *args, **kwargs):
assert self.is_hooked_up, "<STR_LIT>"<EOL>if set_global_context:<EOL><INDENT>set_global_context(self.api.options)<EOL><DEDENT>if args:<EOL><INDENT>self.module_args = module_args = self.get_module_args(args, kwargs)<EOL><DEDENT>else:<EOL><INDENT>self.module_args = module_args = kwargs<EOL><DEDENT>loader = DataLoader()<EOL>inventory_manager = SourcelessInventoryManager(loader=loader)<EOL>for host, port in self.api.hosts_with_ports:<EOL><INDENT>inventory_manager._inventory.add_host(host, group='<STR_LIT:all>', port=port)<EOL><DEDENT>for key, value in self.api.options.extra_vars.items():<EOL><INDENT>inventory_manager._inventory.set_variable('<STR_LIT:all>', key, value)<EOL><DEDENT>variable_manager = VariableManager(<EOL>loader=loader, inventory=inventory_manager)<EOL>play_source = {<EOL>'<STR_LIT:name>': "<STR_LIT>",<EOL>'<STR_LIT>': '<STR_LIT:all>',<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': [{<EOL>'<STR_LIT:action>': {<EOL>'<STR_LIT>': self.module_name,<EOL>'<STR_LIT:args>': module_args,<EOL>},<EOL>'<STR_LIT>': self.api.environment,<EOL>}]<EOL>}<EOL>try:<EOL><INDENT>play = Play.load(<EOL>play_source,<EOL>variable_manager=variable_manager,<EOL>loader=loader,<EOL>)<EOL>if self.api.strategy:<EOL><INDENT>play.strategy = self.api.strategy<EOL><DEDENT>log.info(<EOL>u'<STR_LIT>'.format(u'<STR_LIT>'.format(<EOL>module_name=self.module_name,<EOL>module_args=module_args<EOL>))<EOL>)<EOL>start = datetime.utcnow()<EOL>task_queue_manager = None<EOL>callback = SilentCallbackModule()<EOL>verbosity = self.api.options.verbosity == logging.DEBUG and <NUM_LIT:6> or <NUM_LIT:0><EOL>with ansible_verbosity(verbosity):<EOL><INDENT>with host_key_checking(self.api.host_key_checking):<EOL><INDENT>kwargs = dict(<EOL>inventory=inventory_manager,<EOL>variable_manager=variable_manager,<EOL>loader=loader,<EOL>options=self.api.options,<EOL>passwords=getattr(self.api.options, '<STR_LIT>', {}),<EOL>stdout_callback=callback<EOL>)<EOL>if set_global_context:<EOL><INDENT>del kwargs['<STR_LIT>']<EOL><DEDENT>task_queue_manager = TaskQueueManager(**kwargs)<EOL>try:<EOL><INDENT>task_queue_manager.run(play)<EOL><DEDENT>except SystemExit:<EOL><INDENT>if '<STR_LIT>' in sys.modules:<EOL><INDENT>try:<EOL><INDENT>atexit._run_exitfuncs()<EOL><DEDENT>except Exception:<EOL><INDENT>pass<EOL><DEDENT>os.kill(os.getpid(), signal.SIGKILL)<EOL><DEDENT>raise<EOL><DEDENT><DEDENT><DEDENT><DEDENT>finally:<EOL><INDENT>if task_queue_manager is not None:<EOL><INDENT>task_queue_manager.cleanup()<EOL><DEDENT>if set_global_context:<EOL><INDENT>from ansible.utils.context_objects import GlobalCLIArgs<EOL>GlobalCLIArgs._Singleton__instance = None<EOL><DEDENT><DEDENT>log.debug(u'<STR_LIT>'.format(datetime.utcnow() - start))<EOL>return self.evaluate_results(callback)<EOL>
Puts args and kwargs in a way ansible can understand. Calls ansible
        and interprets the result.