(self, command, module_name="command", timeout=10, forks=10, pattern='')
run command from andible ad-hoc.
        command  : 必须是一个需要执行的命令字符串， 比如 
                 'uname -a'
run command from andible ad-hoc.
        command  : 必须是一个需要执行的命令字符串， 比如 
                 'uname -a'
run command from andible ad - hoc . command : 必须是一个需要执行的命令字符串， 比如 uname - a
def run(self, command, module_name="command", timeout=10, forks=10, pattern=''):
        """
        run command from andible ad-hoc.
        command  : 必须是一个需要执行的命令字符串， 比如 
                 'uname -a'
        """
        data = {}

        if module_name not in ["raw", "command", "shell"]:
            raise CommandValueError("module_name",
                                    "module_name must be of the 'raw, command, shell'")
        hoc = Runner(module_name=module_name,
                     module_args=command,
                     timeout=timeout,
                     inventory=self.inventory,
                     pattern=pattern,
                     forks=forks,
                     )
        self.results_raw = hoc.run()
def run ( self , command , module_name = "command" , timeout = 10 , forks = 10 , pattern = '' ) : data = { } if module_name not in [ "raw" , "command" , "shell" ] : raise CommandValueError ( "module_name" , "module_name must be of the 'raw, command, shell'" ) hoc = Runner ( module_name = module_name , module_args = command , timeout = timeout , inventory = self . inventory , pattern = pattern , forks = forks , ) self . results_raw = hoc . run ( )